Colortextpy is a Python package for adding colors and styles to terminal output, allowing you to create more visually appealing and organized command-line applications.
Project description
colortextpy
Install
Tested on python 3.6-3.11, win11, win11 WSL2, Ubuntu, Nvidia Jetson Nano
It doesn’t support win10
pip install colortextpy
Usage
Printer
from colortextpy import Printer, colorprint
Printer.red_print('red')
Printer.red_print('red', bold=True)
colorprint('violet', color='#aa00ff')
colorprint('bold violet', color='#aa00ff', bold=True)
colorprint('bold violet', color='violet', background=(224, 224, 224), bold=True)
Color
Some Constant of color with hex, rgb, bgr format
Color.red.name, Color.red.hex, Color.red.rgb, Color['red']
('red', '#ff0000', (255, 0, 0), <Color.red>)
Color.available
:
You can also use it with matplotlib.pyplot
:
plt.plot(np.sin(np.linspace(-4, 4, 50)), color=Color.red.hex)
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
colortextpy-0.0.3.1.tar.gz
(14.3 kB
view hashes)
Built Distribution
Close
Hashes for colortextpy-0.0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90c45483e16627e314b87ed5ba0ce9b276ee6b98e26f623f1481853322c4aa8f |
|
MD5 | 8d9d579f2fa1b486a1ae73ffbfa54e20 |
|
BLAKE2b-256 | 95bb3c376be686489bc015984636ac9cd034558f90364e273f99579d7446883b |