Skip to content

colors⚓︎

Color definitions & functionality for matplotlib and the terminal.

color_text(text, *color_codes) ⚓︎

Color a string for the terminal.

Multiple color_codes can be combined. Look them up in colorama.Back and colorama.Fore. Use the single code None for no coloring.

coloring(*color_codes) ⚓︎

Color printing using 'with'.

Examples:

>>> with coloring(colorama.Fore.GREEN):
...    print("--- This is in color ---")