____ _
/ ___| |__ _ __ ___ _ __ ___ ___ ___
| | | '_ \| '__/ _ \| '_ ` _ \ / _ \/ __|
| |___| | | | | | (_) | | | | | | (_) \__ \
\____|_| |_|_| \___/|_| |_| |_|\___/|___/
Package for getting colored text output in Python.
- With Wheel File
pip install Chromos\*.whl`
- Building From Source
python setup.py install
Text:
- Bold (default=True)
- Itallic (default=False)
- Underline (default=False)
- Blink (default=False)
- Strikethrough (default=False)
Text Colors:
- Black
- Red
- Green
- Yellow
- Blue
- Purple
- Cyan
- White
Background Colors:
- Black (default)
- Red
- Green
- Yellow
- Blue
- Purple
- Cyan
- White
- Use
cstr
function for the colored text,
cstr(attributes, string)
- Can also use individual color functions,
blue(color, string)
# Similarly for other color functions
- For printing an error message
# Use error_info or error_info_b
error_info("Error occured!")
- For printing an info message
# Use info or info_y
info("Just informing about the new release :P")
Illustration of usage
import Chromos
o = Chromos.Chromos()
print(o.cstr("blue", "Hello World! *"))
print(o.blue("Hey Chromos! "))
Global Attributes
o.underline = True
print(o.cstr("yellow", "Good stuff!"))
o.itallic = True
o.strikethrough = True
print(o.cstr("red", "Alright, alright!"))
Local Attributes
print(o.cstr("yellow underline", "Cool!"))
print(o.cstr("yellow bgred bf", "Great!"))
Function For Printing an Error Message
o.error_info("This is an Error Msg!" )
Function For Printing an Info Message
o.info_y("This is an Info Msg!" )