Skip to main content

This is a simple package to print colored messages using ASCI to the terminal built with python 3.

Project description

terminalcolorpy

Open Source? Yes!

made-with-python

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


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)

Uploaded Source

Built Distribution

terminalcolorpy-0.0.6-py3-none-any.whl (7.1 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