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
Metadata
Release files for rainbowchar 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rainbowchar-1.1.tar.gz | 2.8 kB | Details |
Release files / rainbowchar-1.1.tar.gz
| Download URL | rainbowchar-1.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b81fbf76aeefa1d7688d25673e829c2d5e473cd4e4308c984e49fad397a6381
|
|
BLAKE2b-256 checksum How to use checksums |
d511cd49a42c16cb3228d3163ad99b18d6f6991cf58f50b00825a06bf248a509
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
|