colorpie
Terminal color style handler.
Installation:
python -m pip install [--upgrade] colorpie
Available tools:
Style4Bit
from colorpie import Style4Bit
style = Style4Bit(
color='red',
highlight='black',
attributes=['bold', 'slow_blink']
)
if __name__ == '__main__':
print(style.format('Hello, World!'))
Style8Bit
from colorpie import Style8Bit
style = Style8Bit(
color=0,
highlight=16,
attributes=['bold']
)
if __name__ == '__main__':
print(style.format('Hello, World!'))
Some colors can be referred to by their name:
black, maroon, green, olive, navy, purple, teal, silver, grey, red, lime, yellow, blue, magenta, cyan, white and gold
Also, by their hex or rgb values.
(see __256_color__
dict in mapping.py).