Simple and lightweight shell color output function.
Project description
python-kolors
Simple and lightweight shell color output function.
It also checks if terminal supports color before vomitting ANSI codes.
Usage
from kolors import c
print c('Some <red>Red</end> and <blue>blue</end> text')
print c('<green bg>Some green background</end>')
print c('Some <cyan bold bg>{}</end>').format('interpolation')
Note: the keyword in the closing tag isn’t really relevant, but I like to use “” everywhere for shortness and consistency. Simple shell color output function.
Colors
grey (alias: gray)
red
green
yellow
blue
magenta (alias: purple)
cyan
white
Styles
bold
bg
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kolors-0.0.3.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for kolors-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29cb1a27fe2c302ff416ac32fd4d86a4955bc83e65425ed49dfca9fd3ae1bea6 |
|
MD5 | a9e1cc6f13f3caacda247f59f2d4b7f5 |
|
BLAKE2b-256 | 6baa7b84b7ceddde692d2d1ce2c8979f66f68b50ff1157f3286cf86e583cbbfe |