ansi library

Classes

TerminalColorTheme
A lightweight container for a 16-color terminal palette plus the usual extra accents (background, cursor, etc.).

Functions

ansiToPlainText(String source) String
Converts ANSI/ASCII escaped terminal output into plain display text.
ansiToTextSpan(String source, {TextStyle? baseStyle}) TextSpan
Converts a string that contains ANSI/ASCII escape codes (SGR sequences) into a TextSpan. Only the most frequently‑used codes are handled (colors, bold, italic, underline, reset). Unknown codes are ignored.