On this page
  1. escape-colors
  2. Role
  3. Install
  4. Quickstart
  5. When to Reach for It
  6. Gotchas & Pitfalls
  7. Pairs With
  8. Metadata

escape-colors

Prev: wispsy | Up: projects | Next: enforce-type
Rel: wispsy, Foundation, recipes
Ref: wispsy on GitHub
Tags: #public #wispsy #project #foundation #tier/core


Role

Dependency-free Python 3.14+ ANSI colors, nested text styles, syntax highlighting, optional terminal Markdown rendering, and portable terminal printing.

Install

python -m pip install escape-colors
# Optional syntax highlighting / terminal Markdown:
python -m pip install "escape-colors[syntax]"
python -m pip install "escape-colors[markdown]"

Quickstart

from escape_colors import ansi_print, blue, escape, escape_ansi

ansi_print("blue(hello world)")
ansi_print("bold(blue(hello red(world) again))")
print(escape_ansi("196(red) bg_232(on dark)"))
print(f"{blue}direct constant{escape}")

When to Reach for It

Gotchas & Pitfalls

Pairs With


Metadata

type: project-card
slug: escape-colors
org: wispsy
repo: wispsy/escape-colors
package: escape-colors
version: 0.3.0
requires_python: ">=3.14"
layer: foundation
topic: wispsy-foundation
status: active
language: python
source_docs: README.md, docs/

Linked from

Related notes