Skip to main content

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

MIT

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

rainbowchar-1.1.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file rainbowchar-1.1.tar.gz.

File metadata

  • Download URL: rainbowchar-1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for rainbowchar-1.1.tar.gz
Algorithm Hash digest
SHA256 7b81fbf76aeefa1d7688d25673e829c2d5e473cd4e4308c984e49fad397a6381
MD5 47842d46f637890dda586a87eeb1804d
BLAKE2b-256 d511cd49a42c16cb3228d3163ad99b18d6f6991cf58f50b00825a06bf248a509

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page