just another mod to print strings in 256 colors in the terminal.
Project description
string-color
string-color is just another python module for coloring strings in print statements.
Installation
$ pip install string-color
CLI Usage
$ string-color
display a list of all 256 colors
$ string-color yellow
show color info for the color yellow
$ string-color "#ff0000"
show color info for the hex value #ff0000
$ string-color *grey*
show all colors with "grey" in the name. also works with "grey*" and "*grey"
Python Module Usage
from stringcolor import cs, bold, underline
# a few examples without background colors.
# for color names see CLI usage above.
print(cs("here we go", "orchid"))
print(cs("away to space!", "DeepPink3"))
print(cs("final fantasy", "#ffff87"))
# bold and underline also available.
print(bold(cs("purple number 4, bold", "purple4")))
print(underline(cs("blue, underlined", "blue")))
# yellow text with a red background.
# color names, hex values, and ansi numbers will work.
print(cs("warning!", "yellow", "#ff0000"))
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
string-color-0.1.6.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for string_color-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36488bf4cc74c3cf6f0815bab5f0b5c7e49ff3e3b90b8424d81ebaefb129e07d |
|
MD5 | 128aafa0e625e9aba7535f6c161cb78b |
|
BLAKE2b-256 | 622c9be19465a5227013d93606c49169cf0016cceac92a40a8e59edd6741168b |