a small colorfull module
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.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.2.7.1.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file chromaconsole-0.2.7.1.tar.gz
.
File metadata
- Download URL: chromaconsole-0.2.7.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3630cbee8514edf2eb804bb9e9d2600be0f017df4d10b381e1791ffa5373c3c6 |
|
MD5 | aa57181757ea8f56512b01191c1a56ed |
|
BLAKE2b-256 | bbff52b06538eef312c3709085b231c42d877b05107250eb4dfdf81e9280dcc6 |
File details
Details for the file chromaconsole-0.2.7.1-py3-none-any.whl
.
File metadata
- Download URL: chromaconsole-0.2.7.1-py3-none-any.whl
- Upload date:
- Size: 3.7 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 | 02d7b6f4c3f1ce7a373ead11ca05608c16c14a06d79aefbc5db4ba176125cf02 |
|
MD5 | 7d8332c219f562a537ffdd4dddad5670 |
|
BLAKE2b-256 | 940fdd5f8d3bf3ddae88ed214728b9f28479d5ab1dc43a30d93361c6ec190692 |