MCPcopy Index your code
hub / github.com/endbasic/endbasic / ansi_color_to_rgb

Function ansi_color_to_rgb

std/src/console/colors.rs:305–307  ·  view source on GitHub ↗

Converts an ANSI color number to an RGB color.

(color: u8)

Source from the content-addressed store, hash-verified

303
304/// Converts an ANSI color number to an RGB color.
305pub fn ansi_color_to_rgb(color: u8) -> RGB {
306 COLORS[(color as usize) % COLORS.len()]
307}
308
309/// Converts an RGB color to an ANSI color number if there is an exact match.
310///

Calls 1

lenMethod · 0.45