color.tui
js/ui/components/color.tui.ts
Shared terminal color adaptation for component lowerings. @internal
Functions
function terminalColor(rgb: readonly [number, number, number], truecolor: boolean): Color
Adapt an RGB tuple to truecolor or its nearest xterm-256 fallback.
function adaptTerminalColor(color: Color, truecolor: boolean): Color
Preserve named/indexed colors and adapt only explicit RGB colors.