module

Termify::ANSI

Single source of truth for all ANSI escape sequences. The renderer and stylesheet never hardcode sequences — they reference this module.

Colors are expressed as ANSI::Color values (ColorANSI, Color256, ColorRGB). Use ANSI.fg / ANSI.bg to convert them to escape sequences.

Constants

BOLD = "\e[1m"
DIM = "\e[2m"
ERASE_LINE = "\e[K"
ITALIC = "\e[3m"
RESET = "\e[0m"
STRIKETHROUGH = "\e[9m"
UNDERLINE = "\e[4m"

Class methods

bg(color : ANSI::Color) : String
Source
fg(color : ANSI::Color) : String
Source
repeat(char : String, times : Int32) : String

Repeat a character using ANSI 'n' repetitions

Source

Nested types