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.8.6.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file chromaconsole-0.2.8.6.tar.gz
.
File metadata
- Download URL: chromaconsole-0.2.8.6.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 015961bbd6eeb72829e7aa19f97fb329615cf256034ace6c77f97ec8292b2816 |
|
MD5 | 438b03c49d337973a635a324b0293d96 |
|
BLAKE2b-256 | 9e06f1c64fc942f38b2b5ee702571df00c09f2e08617b61a3a1923ceba995000 |
File details
Details for the file chromaconsole-0.2.8.6-py3-none-any.whl
.
File metadata
- Download URL: chromaconsole-0.2.8.6-py3-none-any.whl
- Upload date:
- Size: 3.8 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 | 2d5ef62ca4846c42c03db907a9941442e38966def6953d1889ba776a4226056b |
|
MD5 | 9bf312b6ec3ead128b91dda722c7c28b |
|
BLAKE2b-256 | 93575512fee1f2e29995d76224bcdd28d187a25731e75ca46e6d003d85b71b80 |