ansicolors
ANSI colors for Python
Decision gist · record as of 2026-08-14
Yes, if you need simple ANSI coloring in a CLI tool and accept that the package will not be maintained. The library is stable, dependency-free, and widely used (top 5000 on PyPI). Do not use it if you require active maintenance, Python 2 support, or advanced terminal control beyond basic colors and styles. For new projects, consider whether a more actively maintained alternative better suits your risk tolerance.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is frictionless—a pure Python wheel with no runtime dependencies.
- However, the package is abandoned: last release was 2017-06-02, over 3360 days ago, with no commits since 2022-08-18.
- It still works for basic use but will not receive bug fixes or updates.
License · maintenance · safety
ISC (permissive) — Licensed under ISC (permissive), which allows commercial and private use with minimal restrictions. No notable licensing barriers to adoption.
last release 2017-06-02 (3360 days) · last repo commit 2022-08-18 · 35 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 12,803,460 downloads/mo, #1,304 on PyPI
Alternatives
Verify before relying
pip install ansicolors
from ansicolors import color
print(color('my string', fg='blue'))
print(color('some text', fg='red', bg='yellow', style='underline'))- Whether the package's Python 2 support (2.6, 2.7) and older Python 3 versions (3.3–3.6) remain relevant for your use case, given Python 2 EOL.
- Terminal/device compatibility: the description notes fragmented ANSI support across terminals—verify your target environment handles the colors and styles you need.
What it is and what it does
ansicolors is a lightweight library that wraps strings with ANSI escape sequences to add foreground color, background color, and text styling (bold, underline, etc.) for display in terminal emulators. It offers multiple ways to specify colors: 8 basic ANSI names (black, red, green, yellow, blue, magenta, cyan, white), 256-color xterm palette by integer index (0-255), or 24-bit RGB via tuple, CSS color name, hex string, or RGB notation. The library also provides utility functions to strip ANSI codes from styled strings and compute their effective length.
The package has no runtime dependencies and installs as a pure Python wheel, making it trivial to add to any project. However, it is abandoned—the last release was in 2017, and the repository has not been updated since 2022. While the core functionality remains stable and works on modern Python versions, no maintenance or fixes will be forthcoming. Terminal support for ANSI codes varies widely; the library will emit the codes regardless, but not all terminals render all colors and styles accurately.
Use it for
- Colorize CLI tool output (error messages in red, success in green) for better user readability.
- Highlight specific log entries or warnings in terminal-based monitoring or debugging scripts.
- Create styled prompts or status messages in interactive command-line applications.
- Generate colored output for test runners or build tool summaries to distinguish pass/fail/skip states.
- Add visual emphasis to data dumps or formatted text in terminal-based data inspection tools.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need simple ANSI coloring in a CLI tool and accept that the package will not be maintained.
The library is stable, dependency-free, and widely used (top 5000 on PyPI). Do not use it if you require active maintenance, Python 2 support, or advanced terminal control beyond basic colors and styles. For new projects, consider whether a more actively maintained alternative better suits your risk tolerance.
Install
ansicolors on PyPI
Before you install
Installation is frictionless—a pure Python wheel with no runtime dependencies. However, the package is abandoned: last release was 2017-06-02, over 3360 days ago, with no commits since 2022-08-18. It still works for basic use but will not receive bug fixes or updates.
License in practice
Licensed under ISC (permissive), which allows commercial and private use with minimal restrictions. No notable licensing barriers to adoption.
Quickstart
pip install ansicolors
from ansicolors import color
print(color('my string', fg='blue'))
print(color('some text', fg='red', bg='yellow', style='underline'))
Verify before relying
- Whether the package's Python 2 support (2.6, 2.7) and older Python 3 versions (3.3–3.6) remain relevant for your use case, given Python 2 EOL.
- Terminal/device compatibility: the description notes fragmented ANSI support across terminals—verify your target environment handles the colors and styles you need.
Package facts
| License | ISC permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,360 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 12,803,460 / month, #1,304 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: ISC License (ISCL)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: ansicolors-1.1.8-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “xterm 256 colors”
- ansicolorsEmbeds ANSI color and style codes into Python strings for colored…
- coloredColored provides ANSI/VT100 escape sequences for terminal text…
- ansiProvides ANSI escape codes for cursor movement and text styling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also ansi · ansicon · ansiwrap · colored · sty · tcolorpy · ansi2html · ansimarkup · simple-colors · colorclass