A python collection of functions to print of colored text to console / terminal.
With git
GitHub:
git clone https://github.com/irtsa-dev/PyTermColor.git
With pip
PyPi
pip install idev-pytermcolor
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.
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'])