pastel
Bring colors to your terminal.
What it is and what it does
Pastel is a lightweight library for adding ANSI color formatting to terminal output. It provides a simple API to colorize strings using predefined styles (green for info, yellow for comment, black-on-cyan for question, white-on-red for error) or custom style definitions. The library automatically detects whether the output is a TTY and disables colors when appropriate, and allows manual color disabling via a configuration call.
The package has no runtime dependencies and installs easily. It is used internally by cleo and similar terminal UI libraries. However, it has been abandoned since September 2020 with no recent maintenance, meaning it will not receive updates for newer Python versions or address any issues that may arise.
Use it for:
- Add colored output to CLI tools and scripts for better readability and user feedback
- Highlight error, warning, and info messages in terminal applications with predefined semantic styles
- Build terminal-based interfaces that gracefully degrade to plain text when output is not a TTY
- Integrate colored logging or status messages into existing command-line tools
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pastel adds colored text output to terminal applications using predefined or custom styles, with automatic TTY detection and color disabling support.
Yes, if you need simple terminal coloring in a stable, mature project. Pastel is lightweight, has no dependencies, and works reliably for basic use cases. However, do not use it for new projects or active development—it is unmaintained since 2020 and will not receive updates. Consider alternatives that are actively maintained if you need ongoing support or compatibility with future Python versions.
Install
pastel on PyPI
pip
pip install pasteluv
uv add pastelpoetry
poetry add pastelInstalling pastel
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2020-09-16 and no commits since then. It remains functional for current Python versions but will not receive updates or security patches.
License in practice
MIT license is permissive; you can use, modify, and distribute pastel freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pastel
import pastel
print(pastel.colorize('<fg=red;options=bold>This is bold red</>'))
Verify before relying
- Whether the package works reliably on modern Python versions (3.10+) despite being unmaintained since 2020
- Whether predefined styles (info, comment, question, error) remain the only bundled options or if custom style registration is fully documented
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,158 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,539,811/month — #1,724 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pastel-0.2.1-py2.py3-none-any.whl
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
simple-colorsAdds colored and styled text output to terminal…
unclear · top 15,000 on PyPI
stySty provides a simple, customizable string…
permissive · top 15,000 on PyPI
terminaltexteffectsRenders animated visual effects for text…
permissive · top 15,000 on PyPI
clintClint provides command-line interface utilities…
permissive · top 15,000 on PyPI
curtsiesCurtsies provides a Python library for building…
permissive · top 15,000 on PyPI
ascii-colorsUnified terminal UI library providing colored…
permissive · top 15,000 on PyPI
crayonsCrayons provides colored text output for…
permissive · top 15,000 on PyPI
informInform provides specialized print functions for…
permissive · top 15,000 on PyPI
autopageAutomatically pipes terminal output to a pager…
permissive · top 5,000 on PyPI
ansimarkupAnsimarkup converts XML-like markup tags into…
permissive · top 15,000 on PyPI