tcolorpy is a Python library designed to apply true color (24-bit RGB) for terminal text, providing a rich set of methods to style strings with foreground, background, and various ANSI effects. The current version is 0.1.7, and the project maintains an active, though not rapid, release cadence with a focus on Python version compatibility and packaging improvements.
pip install tcolorpyVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of predefined colors, custom RGB, 256-color ANSI codes, and checking terminal true color capability.
Upgrade Python to 3.9+ or install 'tcolorpy<0.1.7'.
Upgrade Python to 3.7+ (preferably 3.9+) or install 'tcolorpy<0.1.3'.
Ensure `tcolorpy.enable()` has been called if colors are not displaying as expected. These functions affect the global state.
Consider checking `tcolorpy.is_true_color_terminal()` before applying true colors, or be aware that fallback to 256-color or basic ANSI colors may be necessary for broader compatibility.
Use the correct capitalization when importing: `from tcolorpy import Color`
First call the color method with your text, and then chain the styling method onto the resulting `Color` object: `Color.red("my text").bold()`Use `fg()` or `bg()` to set the colors. For example: `Color("my text").fg("red")`No dependency data recorded yet.