skillfed

pastel

Bring colors to your terminal.

pastel v0.2.1 7.5M downloads/30d#1,724 on PyPI54
Permissive license MIT Abandoned released

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 pastel

uv

uv add pastel

poetry

poetry add pastel

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

terminal color outputcolorize text in terminalANSI color formattingterminal styling librarycolored console outputterminal text colors
cli-outputterminal-ui

More Terminals packages