Skip to main content

ANSI_256

Constant ANSI_256 

Source
pub const ANSI_256: [Rgb; 256];
Expand description

The 256 colors an xterm-compatible terminal addresses by index, so that entry i is what the terminal paints for 38;5;i.

Three regions, and they are not equally trustworthy. 0-15 are the ANSI_16 system colors, which every emulator lets the user repaint. 16-231 are a 6x6x6 RGB cube and 232-255 a 24-step gray ramp, and those 240 are fixed.

So a color whose whole job is to be told apart from another should quantize against ANSI_240 rather than against this table: a match landing in the low sixteen is a match against a color the user may have moved.