skillfed

colorful

Terminal string styling done right, in Python.

colorful v0.5.8 18.0M downloads/30d#1,091 on PyPI540
Permissive license AGING released

What it is and what it does

Colorful is a terminal styling library that translates color and text formatting requests into ANSI escape codes. It provides a method-based API (e.g., `cf.bold_red('text')`), format-string support, and operator-based composition (`cf.bold & cf.red | 'text'`). The package automatically detects terminal capabilities and adapts output to 8-color, 256-color, or true-color modes, with options to override detection via environment variables or context managers.

The library ships with X11 color names by default and supports custom color palettes, predefined styles (solarized, monokai), and nested styling. It depends on colorama for Windows compatibility. The package has been stable since its 2013 inception and supports modern Python versions through 3.14, though recent maintenance activity is sparse.

Use it for:

  • Add colored output to CLI tools and scripts without manually constructing ANSI escape sequences
  • Build terminal user interfaces with consistent styling across different terminal capabilities
  • Create branded terminal output using custom color palettes matching corporate identity
  • Apply temporary color modes in specific code blocks using context managers
  • Format log output or diagnostic messages with color for improved readability

Worth the install?

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

Colorful applies ANSI color and text styling to terminal strings using a flexible API that supports multiple color modes and predefined palettes.

Yes. Colorful is a mature, low-friction package with no security issues, permissive licensing, and a single lightweight dependency. It solves a common terminal styling problem with a clean API. The aging maintenance status (289 days since last release) is not a blocker for a stable utility, but verify compatibility with your specific Python version before adopting.

Install

colorful on PyPI

pip

pip install colorful

uv

uv add colorful

poetry

poetry add colorful

Installing colorful

Before you install

Low friction: pure Python wheel with a single runtime dependency (colorama). Last release 289 days ago; repository is active and not archived, with 540 stars.

License in practice

MIT license (permissive); you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install colorful

import colorful as cf
print(cf.bold_white('Hello World'))
print(cf.red('red ' + cf.white('white', nested=True) + ' red'))

Verify before relying

  • Whether colorama is automatically installed or must be installed separately on Windows
  • Whether the package works correctly with all listed Python versions (3.4 through 3.14) given the aging maintenance status

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — colorama
Maintenance aging — 289 days since the last release
Last repo commit
First released
Downloads 17,997,435/month — #1,091 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: colorful-0.5.8-py2.py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

terminal color stylingansi color codescolored terminal outputtext formatting terminalterminal string colorsconsole text stylingterminal color palette
terminal-uiansi-colors

More Terminals packages