Simple and lightweight package for coloring text in the CLI
import termcolors
print(termcolors.text.red + "Red text " + termcolors.background.pink + " on pink bg" + termcolors.reset)
# or
print(termcolors.colorize("{{text_red}}Red text {{bg_pink}}on pink bg"))
Color reset
resets all previous color settings
Name | Text | Background |
---|---|---|
black | + | + |
red | + | + |
green | + | + |
yellow | + | + |
blue | + | + |
purple | + | + |
sky | + | + |
gray | + | + |
corral | + | + |
light_green | + | + |
light_yellow | + | + |
pink | + | + |
cyan | + | + |
Run:
pip install git+https://github.com/AlexBrin/termcolors