Function anstyle_lossy::rgb_to_ansi

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

Lossily convert an RGB value to a 4-bit color

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