Map an RGB color to the nearest 256-color palette index.
Used for Tier A color fallback. Implements the standard xterm-256 color cube mapping with grayscale ramp.
Red component (0-255)
Green component (0-255)
Blue component (0-255)
Nearest 256-color palette index (16-255)
Map an RGB color to the nearest 256-color palette index.
Used for Tier A color fallback. Implements the standard xterm-256 color cube mapping with grayscale ramp.