skillfed

tcolorpy

tcolopy is a Python library to apply true color for terminal text.

tcolorpy v0.1.7 2.9M downloads/30d#2,851 on PyPI12
Permissive license MIT License Active released

What it is and what it does

tcolorpy is a lightweight Python library for styling terminal text with true color and text effects. It wraps ANSI escape sequences, allowing you to colorize and format output using either hex color codes (like "#ee1177") or standard color names ("red", "green", etc.), combined with styles such as bold, italic, underline, and others.

The library has no external dependencies and works as both a Python module and a command-line tool. You import the tcolor function, pass a string along with color and style arguments, and get back a formatted string ready to print. It's designed for developers who want to add visual emphasis to terminal output without manually constructing ANSI escape codes.

Use it for:

  • Colorize log output or status messages in CLI applications with semantic colors (red for errors, green for success).
  • Add visual emphasis to terminal-based progress indicators, warnings, or debug output.
  • Build styled help text or command-line interfaces with consistent color and formatting rules.
  • Generate colored terminal output in scripts for better readability and user experience.
  • Apply multiple text styles (bold + underline + color) to highlight important information in terminal output.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Applies ANSI true color and text styles (bold, italic, underline, etc.) to terminal output using hex color codes or named colors.

Yes. tcolorpy is a low-friction, dependency-free utility for terminal styling with active maintenance, no known vulnerabilities, and permissive licensing. Install it if you need to add true color and text effects to terminal output; skip it if your application doesn't interact with terminals or if you're already using a larger terminal UI framework.

Install

tcolorpy on PyPI

pip

pip install tcolorpy

uv

uv add tcolorpy

poetry

poetry add tcolorpy

Installing tcolorpy

Before you install

Low friction: pure Python wheel with no external dependencies and active maintenance (last commit 2026-04-13). Supports Python 3.9+ across CPython and PyPy.

License in practice

MIT License permits unrestricted use, modification, and distribution with minimal obligations—suitable for commercial and private projects.

Quickstart

pip install tcolorpy

from tcolorpy import tcolor

print(tcolor("Hello", color="#ee1177", styles=["bold", "italic"]))

Requires Python 3.9 or later.

Verify before relying

  • Whether terminal support for true color is automatically detected or requires manual configuration.
  • Behavior on terminals that do not support true color or ANSI escape sequences.

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 593 days since the last release
Last repo commit
First released
Downloads 2,869,211/month — #2,851 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tcolorpy-0.1.7-py3-none-any.whl

Keywords: ANSI escape, terminal color, truecolor

Development Status :: 4 - BetaIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: TerminalsTopic :: Text ProcessingTyping :: Typed

Tags

terminal text colorANSI color codescolored terminal outputterminal stylingtruecolor terminalterminal text formatting
cli-stylingansi-colors

More Libraries packages