Skip to main content

A Python module to apply ANSI, RGB and HEX colors in terminal output.

Project description

gp

gpColor

gpColor is a Python module for applying ANSI, RGB and HEX colors in terminal output.

Installation

install via pip

pip install gpColor
git clone https://github.com/gpbot-org/gpColor
cd gpColor

python setup.py install

Usage

from gpColor import colorize as color

'''how to use text color'''
print(color("This is bright red text", font='bright_red'))
print(color("This is RGB text", font=(255, 0, 0)))
print(color("This is HEX text", font='#FF5733'))

'''
>_ How to use background color with text color

text       : font
background : back
'''
print(color("This is blue text with yellow background", font='blue', back='yellow'))
print(color("This is RGB text", font=(255, 0, 0), back=(255,255,255))
print(color("This is HEX text", font='#FF5733', back='#FFFFFF'))

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

gpcolor-1.0.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

gpColor-1.0.1-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

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