--- id: ansicolors version: "1.1.8" license: ISC license_treatment: permissive maintenance: abandoned --- # ansicolors — ANSI colors for Python License: permissive · Maintenance: abandoned · Downloads: 12.8M/mo ## 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 above — verify before relying. Embeds ANSI color and style codes into Python strings for colored terminal output, supporting 8 basic colors, 256-color xterm palette, 24-bit RGB, and CSS color names. 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 pip install ansicolors uv add ansicolors poetry add ansicolors ## Installing ansicolors 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: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 12.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ANSI color codes Python, terminal colored text, console output styling, RGB color terminal, xterm 256 colors, text decoration ANSI, colored strings Python, cli-output, terminal-styling, abandoned [View on SkillFed](https://skillfed.io/packages/ansicolors) · [View on PyPI](https://pypi.org/project/ansicolors/)