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.1.1.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file chromaconsole-0.3.1.1.tar.gz
.
File metadata
- Download URL: chromaconsole-0.3.1.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 058ac207d9396abb811172e35418233660f4bfc87e7249f319d0568a91422b70 |
|
MD5 | 1bb4e96b5da3caad1c4cd79e3208eb31 |
|
BLAKE2b-256 | 8fbc81286b9b5e0b1fa02a43e52cd4e4e45ddf72ecf3ad879ce932ff93443063 |
File details
Details for the file chromaconsole-0.3.1.1-py3-none-any.whl
.
File metadata
- Download URL: chromaconsole-0.3.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 599573da7afb3b8a6aa726d7ebda687a8eb387559248ffbe2c5595e92226bf3f |
|
MD5 | dcb149d99e849979c15768f4c83d61af |
|
BLAKE2b-256 | 603bcddf4b91146f6c7e400f21ebd334794bae406739559600646c91bc0155f8 |