colored
Simple python library for color and formatting to terminal
What it is and what it does
Colored is a Python library that generates ANSI/VT100 escape sequences to add color and text formatting to terminal output. It exposes color names and codes through simple objects like Fore (foreground), Back (background), and Style (text effects), making it straightforward to colorize printed text without manually constructing escape sequences.
The library supports three color modes: named colors (e.g., red, green), 256-color terminal palettes, and modern 24-bit RGB colors. It works across Windows, Linux, and most terminal emulators that recognize ANSI escape sequences, including Xterm, KDE Konsole, iTerm, and GNOME Terminal. With no runtime dependencies and Python 3.9+ as its only requirement, it is lightweight and easy to integrate into terminal-based applications.
Use it for:
- Colorize log output in CLI tools to highlight errors, warnings, and info messages by severity level.
- Build interactive terminal applications with colored prompts, status messages, and formatted tables.
- Add visual distinction to test output or build system reports for easier scanning.
- Create colored help text and usage documentation in command-line interfaces.
- Highlight syntax or structure in terminal-based data viewers or debugging utilities.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Colored provides ANSI/VT100 escape sequences for terminal text coloring and formatting, supporting 256-color and RGB (24-bit) modes across Windows, Linux, and compatible terminal emulators.
Yes. Colored is a stable, permissively licensed library with zero dependencies, low install friction, and active maintenance. It solves a common terminal formatting need with a simple API. Install it if you need to add color to CLI output; skip it only if your application has no terminal component or already uses a heavier framework that bundles terminal styling.
Install
colored on PyPI
pip
pip install coloreduv
uv add coloredpoetry
poetry add coloredInstalling colored
Before you install
Low install friction with no runtime dependencies; marked active maintenance as of 139 days since last release.
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions.
Quickstart
pip install colored
from colored import Fore, Back, Style
print(f'{Fore.white}{Back.green}Colored is Awesome!!!{Style.reset}')
Requires Python 3.9 or later.
Verify before relying
- Actual RGB color support breadth across different terminal emulators beyond Xterm, Konsole, iTerm, and libvte-based terminals.
- Whether the library handles color fallback gracefully on terminals that do not support 256-color or RGB modes.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 139 days since the last release |
| First released | |
| Downloads | 1,385,739/month — #3,973 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: colored-2.3.2-py3-none-any.whl
Keywords: xterm, color, colour, vt100, ansi, terminal, text, rgb, linux, windows
Tags
More Terminals packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
richRich renders styled text, tables, progress…
permissive · top 100 on PyPI
coloramaColorama makes ANSI escape sequences for…
permissive · top 100 on PyPI
wcwidthMeasures the displayed width of Unicode strings…
permissive · top 1,000 on PyPI
ptyprocessRun a subprocess in a pseudo terminal (pty) and…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
ansiProvides ANSI escape codes for cursor movement…
permissive · top 15,000 on PyPI
ansicolorsEmbeds ANSI color and style codes into Python…
permissive · top 5,000 on PyPI
autopageAutomatically pipes terminal output to a pager…
permissive · top 5,000 on PyPI
colorclassProvides ANSI color text output for console…
permissive · top 5,000 on PyPI
curtsiesCurtsies provides a Python library for building…
permissive · top 15,000 on PyPI
log-symbolsProvides colored Unicode symbols (✔, ℹ, ⚠, ✖)…
permissive · top 5,000 on PyPI
pansiPansi provides a clean interface for rendering…
permissive · top 15,000 on PyPI
coloredlogsAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
ansiwrapWraps and formats text while correctly handling…
permissive · top 5,000 on PyPI