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.5.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file chromaconsole-0.2.5.tar.gz
.
File metadata
- Download URL: chromaconsole-0.2.5.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 354f8b2ff78af0c988b1fe1e47794201d47dfe1f7ebc29d8b8e61cd66fa06f95 |
|
MD5 | e19c13a0c011d37541149f3a1ab21fc2 |
|
BLAKE2b-256 | 9ae1e47a027bfd7b275e5e5dd94fcb0de28962b08e19dd019f36250a1a9da4e2 |
File details
Details for the file chromaconsole-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: chromaconsole-0.2.5-py3-none-any.whl
- Upload date:
- Size: 3.5 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 | 34f4d5e64fc4f279728a35d2224a41e4617368e17befeecf788e02beb710089a |
|
MD5 | 9bd8a518f26ab68342ad47cdf58d0e43 |
|
BLAKE2b-256 | 7460beeee8a77e15369484a8faf752e6db3d63ed23bfbc238f0df1a147d4ea49 |