Skip to main content

colorP

This package is a small and simple utility for printing colored strings on consoles. colorP supports 9 different formatting styles and several foreground and background colors!

You can install it by issuing the following command on a UNIX terminal:

sudo pip install -i colorp

Usage:

Methods :-

pPrint(args,text,br=?):

  • args: is a dictionary object, which needs atleast one of s,fg or bg defined with the corresponding values as strings.
args = {'s':'bold','fg':'red','bg':'white'}
  • text: is the string to be printed with the given styling
  • br: [OPTIONAL ARGUMENT: default value= True], can set it to False if you need no linebreak after ouput.

Eg():

  • prints out examples of a few colors and styles for user visualization.

Styling and Formatting:

  • The args object decides how the text will be formatted. Each key in args can be one of certain pre-defined values. They are listed below:
  • 's': Text style
Value Description
'plain' Formats the text as plain text
'bold' Bolds the text
'dim' Dims the text
'italic' Italicizes the text
'underline' Underlines the text
'blink' Blinks the text repeatedly
'reverse' Swaps foreground and background values
'hidden' Hides the text on display
'striked' Strikes off the desired text
  • 'fg': Font color
Value
'black'
'red'
'green'
'yellow'
'blue'
'magenta'
'cyan'
'lightgray'
'darkgray'
lightred'
'lightgreen'
'lightyellow'
'lightblue'
'lightmagenta'
'lightcyan'
'white'
'default'
  • 'bg': Background color
Value
'black'
'red'
'green'
'yellow'
'blue'
'magenta'
'cyan'
'lightgray'
'darkgray'
lightred'
'lightgreen'
'lightyellow'
'lightblue'
'lightmagenta'
'lightcyan'
'white'
'default'
NOTE:
  • 'bg' has the same possible values as 'fg'.

Metadata

Release files for colorp 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colorp 0.0.1
File Size Uploaded
colorp-0.0.1.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colorp 0.0.1
File Interpreter ABI Platform
colorp-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / colorp-0.0.1.tar.gz

Download URL colorp-0.0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
59f604107265c71886529f820f95eb4338c39adc8653651ede0de1e79f27ae3e
BLAKE2b-256 checksum
How to use checksums
8d818fc8c35af10aa044288a5d0adbf2624faf9668397ea1ec9a0cbb8e2d0a82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release files / colorp-0.0.1-py3-none-any.whl

Download URL colorp-0.0.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b30d73a829f47740ff85abf5bf111bc5031c47406258f98d42586a7257ca5303
BLAKE2b-256 checksum
How to use checksums
dd3d1fa7131700a8279f619b955ca78cf47ba14ae96dee0cf118b42f9e29933e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page