skillfed

crayons

TextUI colors for Python.

crayons v0.4.0 500.8K downloads/30d#6,319 on PyPI417
Permissive license MIT Abandoned released

What it is and what it does

Crayons is a lightweight wrapper around colorama that simplifies colored terminal output in Python. It provides named color functions (red, green, yellow, blue, black, magenta, cyan, white) that automatically wrap text in the appropriate ANSI codes and reset the terminal state afterward, eliminating the need to manually manage color state. The package detects whether output is going to a TTY and suppresses colors when piped, and it correctly calculates string length for colored output.

The package is powered by colorama and has a single runtime dependency. It supports Python 2.7 and Python 3.4 through 3.8 according to its classifiers. Since its last release in 2020, the project is no longer actively maintained, though the core functionality remains stable for basic terminal coloring tasks.

Use it for:

  • Add colored output to CLI tools and scripts for better readability and user feedback
  • Highlight errors, warnings, and success messages in terminal applications with distinct colors
  • Create visually distinct log output or status reports in command-line utilities
  • Build interactive terminal UIs where color improves navigation and information hierarchy

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Crayons provides colored text output for terminal applications by wrapping strings in ANSI color codes and automatically resetting to the original state afterward.

Yes, if you need simple terminal colors and don't require active maintenance. Crayons is lightweight, has no complex dependencies beyond colorama, and works reliably for basic colored output. However, the abandoned status means no bug fixes or Python version updates will be released—use it only if you're comfortable with a stable but unmaintained package, or if you're targeting Python versions it already supports.

Install

crayons on PyPI

pip

pip install crayons

uv

uv add crayons

poetry

poetry add crayons

Installing crayons

Before you install

Installation is straightforward with low friction. The package is abandoned as of 2020-08-26, so no active maintenance is expected, though it remains stable for basic terminal color use.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.

Quickstart

pip install crayons

import crayons
print(crayons.red('red text'))
print(crayons.green('green text'))
print(crayons.blue('blue text'))

Verify before relying

  • Whether the package works reliably with Python versions beyond 3.8 (classifiers list 3.8 as the latest tested version)
  • Current compatibility with modern versions of colorama, its sole runtime dependency

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — colorama
Maintenance abandoned — 2,179 days since the last release
Last repo commit
First released
Downloads 500,822/month — #6,319 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: crayons-0.4.0-py2.py3-none-any.whl

License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming 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 :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

terminal text colorscolored output pythonansi color codesterminal stylingconsole text coloringtty color formattingterminal ui colors
terminal-uicli-colors

More Terminals packages