🦜Awesome cprint() function to colored terminal text. Supported full RGB!
Project description
Coloratura
Awsome cprint() function to colored terminal text. Supported full RGB!
Installation
You can install coloratura with pip as follows:
pip install coloratura
Usage
First of all, get the basic cprint functions and selected color palettes:
from coloratura import cprint, Pantone, Bit4
Printing colored text is incredibly ea``sy:
cprint('This text is in the CLASSIC BLUE color from the Pantone palette', color=Pantone.CLASSIC_BLUE)
Easy right? But what if you want to print text with a colored background?
cprint('This is great!', color=Pantone.EMERALD, bg=Pantone.ULTIMATE_GRAY)
You can also add styles to the font:
cprint('This string is italic and green', color=Bit4.GREEN, styles=['italic'])
You can mix multiple text styles
cprint('This string is italic and bold',, styles = ['italic', 'bold'])```
Colors and styles
List of all styles
bold, italic, underline, strong-underline, crossed-out, framed
Remember: Styles can be mixed together by including them in the list of strings
List of all colors from the pantone palette:
List of all colors from the 4bit palette:
Too little?
With the Color class you can define your own colors in the full RGB spectrum
Look how simple it is:
YOUR_COLOR = Color('rgb', 191, 25, 50)
..and this is just the beginning of this great library!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file coloratura-1.0.tar.gz
.
File metadata
- Download URL: coloratura-1.0.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36d1bc009b025f65e0be198e023d373679ed42b15c811ec95f182bc1b534ea0 |
|
MD5 | 668e70ed991092d56e9547ee749f722b |
|
BLAKE2b-256 | 0f67d3fb81fde51bcf3ca06952bce07834b108558df2f41ef10dfe278fdf0cb5 |