ANSI 256 to RGB Converter
Convert xterm 256-color index codes to RGB hex and CSS values with live preview.
O
M
T
Convert terminal palette codes to RGB
ANSI 256-color indexes power terminal themes, CLI output, and many developer tools. Enter a code from 0 to 255 to see the matching RGB hex value, CSS color, and which palette region it belongs to (standard, cube, or grayscale).
Related: HEX to RGB Converter and RGB to HEX Converter.
Frequently Asked Questions
Which terminals use the 256-color palette?
xterm-compatible emulators (GNOME Terminal, iTerm2, Windows Terminal, and most Linux consoles) map ANSI 256 indexes to the same RGB cube and grayscale ramp shown here.