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.5.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for terminalcolorpy-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0458d160a92e56670178fef7c8c7d604223e614ceefc8d702216e3ac7db6af87 |
|
MD5 | c39a5906a3c8e539c981a1d1ad08c538 |
|
BLAKE2b-256 | 03760f893e0c970b0dd6b72ea87c731d53f352db0e122277cb79c3f21eda0b17 |