This is a simple package to print colored messages using ASCI to the terminal built with python 3.
Project description
terminalcolorpy
This is a simple package to print colored messages using ASCI to the terminal built with python 3.
Usage of terminalcolorpy
Usage of it is pretty straight-forward,
print(prainbow('Hello'))
print(prgb('World', rgb=[255, 0, 0]))
print(pcolor('!', 'black'))
TerminalColorPy has 3 main functions,
- prainbow
- prgb
- pcolor
prainbow takes a single parameter which is text to return as rainbow
prgb takes 2 mandatory & 2 optional parameters. text (str), rgb (list) being mandatory and markup (list) & highlight (str) being optional.
- text ; text to return
- rgb ; color of the text [R, G, B]
- markup ; what markups to use on the text (see bellow)
- highlight ; color to highlight the text with
pcolor being same as prgb but instead of a rgb parameter it takes a color (see bellow for accepted ones)
List of accepted values
highlight_values = [
'gray',
'pink',
'black',
'yellow',
'green',
'blue',
'red'
]
color_values = [
'pink',
'blue',
'cyan',
'green',
'yellow',
'red',
'black',
'orange'
]
text_markup_values = [
'bold',
'underline',
'italic',
'striked'
]
RGB parameter takes any values from 0 to 255.
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
terminalcolorpy-0.0.6.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for terminalcolorpy-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f4aae34820d9ae48d7b5b0be879f1534f4790039a2c2cd7fde44152688567de |
|
MD5 | f537ead8da884df1f3fa0e0d61636559 |
|
BLAKE2b-256 | 891ec3a33af0b4bed7abb06e903cb83363e604701bf0bee908f74832dad61002 |