RainbowChar is a lib that stylizes text by formatting in ANSI escape code. It only supports true color terminals.
Project description
rainbow-char-lib
RainbowChar is a lib that stylizes text by formatting in ANSI escape code. It only supports true color terminals.
Installation
Use the package manager pip to install rainbow-char-lib.
pip install rainbowchar
Usage
A simple example of a hello world.
from rainbowchar.rainbow import paint
def showcase():
hello = paint('hello', foreground='#00FF28', italic=True)
world = paint('world!', foreground='#00FF28', italic=True)
print('{} {}'.format(hello, world))
print(paint(':D', foreground='#000000', background='#FFFF0A', bold=True))
if __name__ == '__main__':
showcase()
Parameter list
Function paint parameter list.
Parameter | Description | Type | Default |
---|---|---|---|
text | Text to stylize | str | none |
foreground | Hexadecimal color of foreground | str | none |
background | Hexadecimal color of background | str | none |
bold | Bold flag | bool | none |
italic | Italic flag | bool | none |
underline | Underline flag | bool | none |
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rainbowchar-1.1.tar.gz
(2.8 kB
view hashes)