Skip to main content

Module ansi_codes

Module ansi_codes 

Source
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§

TermColor
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