Expand description
ANSI terminal code definitions and handlers
This module provides constants and utilities for handling ANSI escape codes commonly used in terminal output, focusing on rich text formatting including 24-bit true color and extended attribute support.
Modules§
- control
- Basic ANSI control codes
- csi
- CSI (Control Sequence Introducer) sequences
- modes
- Mode switching sequences
- mouse
- Mouse reporting modes
- osc
- OSC (Operating System Command) sequences
- sgr
- SGR (Select Graphic Rendition) for text styling
Enums§
- Term
Color - Terminal color code definitions
Functions§
- color_
name_ to_ code - Color name to ANSI code mapping
- extract_
ansi_ styles - Extract structured style information from ANSI-formatted text
- format_
ansi_ text - Format text with ANSI styling
- parse_
ansi_ sequences - Parse ANSI escape sequences in text
- strip_
ansi_ codes - Strip all ANSI escape sequences from text