A small colorful module to change text colors in terminal
Project description
Chroma Console
Chroma console is a python package for adding color and style to terminal text output using ANSI escape codes.
Installation
pip install chromaconsole
Functions
Style.bold()
Style.italic()
Style.underline()
Style.strikethrough()
Style.negative()
Style.normal()
Style.reset()
Style.minecraft(*args)
Color.text(*args)
Color.background(*args)
Example usage
from chromaconsole import Color, Style
print(f"{Color.text(r, g, b)}here is RGB colored text{Style.reset()}")
print(f"{Color.background(r, g, b)}here is RGB colored background{Style.reset()}")
print(f"{Color.text('#rrggbb')}here is HEX colored text{Style.reset()}")
print(f"{Color.background('#rrggbb')}here is HEX colored background{Style.reset()}")
print(f"{Style.bold()}Bold {Style.reset()}")
print(f"{Style.italic()}Italic {Style.reset()}")
print(f"{Style.underline()}Underline {Style.reset()}")
print(f"{Style.strikethrough()}Strikethrough {Style.reset()}")
print(f"{Style.bold()}{Style.italic()}bold+italic {Style.reset()}")
print(f"{Style.minecraft('§','§ahello §4world§r')}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chromaconsole-0.3.0.1.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for chromaconsole-0.3.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d2b95546618a316f8640c9d6a41a50a4a4e5d2c20659f1c7ee5e910081556f5 |
|
MD5 | 77cc64e427eb7a636c3c25133d43871b |
|
BLAKE2b-256 | daaf5a6184f35c77bf4b212fd237b11efd799ab8647dbfaa556fe28c012eb4b0 |