Skip to content

Python library for terminal color support (including 256-color support)

License

Notifications You must be signed in to change notification settings

guillaumealgis/xtermcolor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

With pip

$ pip install xtermcolor

Using setup.py

$ python setup.py install

Command Line Usage

$ xtermcolor --help
usage: xtermcolor [-h] [--color COLOR] [--compat {xterm,vt100}] {convert,list}

xtermcolor: 256 terminal color library

positional arguments:
  {convert,list}        Actions

optional arguments:
  -h, --help            show this help message and exit
  --color COLOR         Color to convert
  --compat {xterm,vt100}
                        Compatibility mode. Defaults to xterm.

Python Module Usage

>>> from xtermcolor.ColorMap import XTermColorMap, VT100ColorMap
>>> cmap = XTermColorMap()
>>> print(cmap.colorize('Hello World', 0x00ffec))
Hello World

About

Python library for terminal color support (including 256-color support)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%