Skip to content
/ clicolor Public

Quick python reference for terminal color escape codes

License

Notifications You must be signed in to change notification settings

camas/clicolor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clicolor

PyPI version Build Status

Quick python reference for terminal color escape codes

Usage

Install options:

  • Install the package clicolor

  • Add as a submodule

git submodule add https://github.com/camas/clicolor
  • Or just copy cli.py and LICENSE somewhere

Then from clicolor.cli import CLI, ...

Examples

print(f"{CLI.BG_YELLOW}{CLI.GREEN}Green on yellow.{CLI.RESET}")

Green text on yellow background example

print(f"{CLI.BOLD}{CLI.RED}Bold red.{CLI.RESET}")

Bold red text example

print(f"{CLIT.bg(128,0,0)}{CLIT.fg(255,99,71)}Truecolor tomato red on maroon red background{CLI.RESET}")

Truecolor red example

test.py

use test.py to run a variety of tests including modifiers, 8/16 colors, 256 colors and Truecolors.

About

Quick python reference for terminal color escape codes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages