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
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")))
print(bold(underline(cs("bold AND underlined!", "gold"))))
# yellow text with a red background.
# color names, hex values, and ansi numbers will work.
print(cs("warning!", "yellow", "#ff0000"))
CLI Usage
positional arguments:
color show info for a specific color:
$ string-color red
$ string-color '#ffff87'
$ string-color *grey* # wildcards acceptable
optional arguments:
-h, --help show this help message and exit
-x, --hex show hex values
-r, --rgb show rgb values
--hsl show hsl values
-a, --alpha sort by name
-v, --version show program's version number and exit
$ 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"
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.2.2.tar.gz
(9.0 kB
view hashes)
Built Distribution
Close
Hashes for string_color-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d51ec7872ec54cfcd8a5f0e77f1123c985ec18bca52f2a7c1688efabee51dd3 |
|
MD5 | fc7bcf00d3b391768bede669e7b7e734 |
|
BLAKE2b-256 | 65f34ca56f31cd4941142d6c457270e13c62b99fd84170c3e103e7c764b9a1db |