Skip to main content

A python collection of functions to print of colored text to console / terminal.

​

Installation

With git GitHub:

git clone https://github.com/IrtsaDevelopment/PyTermColor.git

Or with pip PyPi

pip install idev-pytermcolor






Usage

To import:

from PyTermColor.Color import *

Then, later on you may utilize:

printColor(text: str, textColor: str, backgroundColor: str = None, decorations: list | str = [], end: str = '\n')
# Prints off text and background in the given color with provided decorations.

printRGBColor(text: str, textRGB: tuple, backgroundRGB: tuple = (), decorations: list | str = [], end: str = '\n')
# Prints off text and background in the given rgb value with provided decorations.


showColorList()
# Prints off a list of valid arguments for color.

showDecorationList()
# Prints off a list of valid arguments for decoration.

​

Code Examples

from PyTermColor.Color import *

printColor('hello', 'red')
from PyTermColor.Color import *

printColorRGB('hello', (100, 200, 50))
from PyTermnColor.Color import *

printColor('hello', 'red', decorations = 'bold')
printColor('hello there', 'red', decorations = ['bold', 'underline'])

Metadata

Release files for idev-pytermcolor 1.0.0

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

Source distribution (sdist)

Source distribution for idev-pytermcolor 1.0.0
File Size Uploaded
idev-pytermcolor-1.0.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for idev-pytermcolor 1.0.0
File Interpreter ABI Platform
idev_pytermcolor-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / idev-pytermcolor-1.0.0.tar.gz

Download URL idev-pytermcolor-1.0.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fd4b2157fdff3b542d1a546fe290140c87642150c599b898e062f77799575f34
BLAKE2b-256 checksum
How to use checksums
1da0a7a3575780fe0f6457702b72c8b621e0cce28ceb40d3c4c5f089c6c4fd3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / idev_pytermcolor-1.0.0-py3-none-any.whl

Download URL idev_pytermcolor-1.0.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e277447d3f7a1bfd7882ed7daf51a4abe16408c940b39b6f2c63a85f4f3932cc
BLAKE2b-256 checksum
How to use checksums
de8ff34fd3cfaafe0a27d34ad3e285ecea983731a7fbf7fb0c3925e0df77e44b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.0.0 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