Function anstyle_lossy::xterm_to_ansi

source ·
pub const fn xterm_to_ansi(color: Ansi256Color, palette: Palette) -> AnsiColor
Expand description

Lossily convert from the 256-color palette to 4-bit color

As the palette for 4-bit colors is terminal/user defined, a palette::Palette must be provided to match against.