Skip to main content

Module colors

Module colors 

Source

Enums§

Color
A named ANSI color or modifier that can appear as a %color token in templates.
NamedColor
A named ANSI color attribute.

Statics§

STRIP_ANSI_RE

Functions§

init
Initialize color output with terminal detection.
strip_ansi
Strip all ANSI escape sequences from a string.
validate_color
Validate a color name string, returning the longest valid prefix and its original length.
visible_len
Return the visible (non-ANSI) display width of a string.