# termcolor

> ANSI colour formatting for terminal output in Python

Source: https://talira.ai/catalog/termcolor-30yeeqf2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / terminal ui](https://talira.ai/categories/libraries/terminal-ui), [languages / python](https://talira.ai/categories/languages/python)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Supports: [NO_COLOR](https://talira.ai/standards/no-color.md), [FORCE_COLOR](https://talira.ai/standards/force-color.md)[^3]
- Backed by: [termcolor](https://talira.ai/orgs/termcolor-org.md)

termcolor is a small Python library for colouring terminal output with ANSI codes. `colored()` returns coloured text and `cprint()` prints it, with named text colours, background highlights, attributes such as bold, underline and reverse, and arbitrary RGB colours as tuples. Colour can be turned off or forced per call, or through the `ANSI_COLORS_DISABLED`, `NO_COLOR` and `FORCE_COLOR` environment variables, and a dumb terminal disables it; otherwise it detects whether the terminal supports colour.

## Links

- GitHub: https://github.com/termcolor/termcolor

## Problems it solves

- print coloured text to the terminal from a Python script
- highlight errors in red in my Python CLI output
- make my Python tool respect NO_COLOR

## Features

- colored() and cprint() with named colours, highlights and attributes
- RGB colours as 0-255 tuples
- honours NO_COLOR, FORCE_COLOR and ANSI_COLORS_DISABLED
- detects whether the terminal supports colour

## Limitations

- Attributes such as bold, blink and italic depend on the terminal; on Windows only reverse is listed as working.[^1]

## Trust

Overall: 0.48 out of 1.
Signals: maintenance 0.76, adoption 0.50, momentum 0.22, community 0.46, backing 0.30, extensibility 0.00.

- last commit 15 days ago
- 24 commits in the last 90 days
- latest release 3.3.0 11 months ago
- 331 GitHub stars
- 13 contributors
- accepts sponsorship (Github, Tidelift)
- has a company behind it

## Alternatives

- [Colorama](https://talira.ai/catalog/colorama-h5g60n84.md): Cross-platform coloured terminal text in Python

## Sources

[^1]: https://github.com/termcolor/termcolor/blob/main/README.md (checked 28 Nov 2026)
[^2]: https://github.com/termcolor/termcolor/blob/main/COPYING.txt (checked 28 Nov 2026)
[^3]: https://github.com/termcolor/termcolor/blob/main/README.md (checked 29 Nov 2026)
