A python collection of functions to print of colored text to console / terminal.
Project description
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'])
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file idev-pytermcolor-1.0.0.tar.gz.
File metadata
- Download URL: idev-pytermcolor-1.0.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd4b2157fdff3b542d1a546fe290140c87642150c599b898e062f77799575f34
|
|
| MD5 |
d4028c26f54db59c3513a183fd05309c
|
|
| BLAKE2b-256 |
1da0a7a3575780fe0f6457702b72c8b621e0cce28ceb40d3c4c5f089c6c4fd3a
|
File details
Details for the file idev_pytermcolor-1.0.0-py3-none-any.whl.
File metadata
- Download URL: idev_pytermcolor-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e277447d3f7a1bfd7882ed7daf51a4abe16408c940b39b6f2c63a85f4f3932cc
|
|
| MD5 |
bbe93e9436200a225dd0d3bc04ac6f3b
|
|
| BLAKE2b-256 |
de8ff34fd3cfaafe0a27d34ad3e285ecea983731a7fbf7fb0c3925e0df77e44b
|