Ascii text color code tagging for python prints and logs
Project description
QuickColor
QuickColor is a Python library providing tags for color formatting sections of printable content. The tags can be flexibly used as part of any string as they simply resolve to the ASCII color codes interpreted by your terminal or terminal emulator.
Installation
Use the package manager pip to install quickcolor.
pip install quickcolor
Library Usage
from quickcolor.color_def import color
# colorize printable content
print(f"{color.CGREEN2}This text is bold green{color.CEND}")
from quickcolor.color_def import colors
# alternate method to colorize printable content
print(f"Formatting this phrase part to {colors.fg.yellow}display yellow{colors.off}")
CLI Utility
The following CLI is included with this package for visualizing available color fields and code combinations.
# qc -h
usage: qc [-h] {shell.colors,color.fields} ...
-.-.-. Color attributes for python scripts
positional arguments:
{shell.colors,color.fields}
shell.colors display a color chart for current shell
color.fields display class color fields
options:
-h, --help show this help message and exit
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
License
Acknowledgements
Inspiration for the color names came from this StackOverflow reply.
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
quickcolor-0.1.1.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for quickcolor-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4038bbb1eba1b38da04be5ee1a3a2de79c14813b52dbc654173dd6b1b2073168 |
|
MD5 | 370119fa7c7b627450d1eaf645fb2007 |
|
BLAKE2b-256 | d1678c1b07ce0f3f43ecd6fb5f4b6e1bd8cc6dab21d362fcaea5434e953e42bd |