Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

colors

Aliases: color, colours, colour

The colors command displays a reference chart of terminal colors and text attributes. It shows 24 named entries and the full 256-color ANSI palette, each rendered in its own style so you can see exactly how your terminal interprets each code.

Usage

uplot colors
uplot color

Example

uplot colors

Output format

The output is a single line containing all 280 entries (24 named plus 256 indexed), each separated by tabs. Every entry shows the color name or index number rendered in that color, followed by a bullet swatch. The ANSI escape codes are part of the content being displayed, so the output always includes color escapes regardless of the -C and -M flags.

The first 24 entries include the 16 standard and bright ANSI colors (black through light_cyan, plus gray as an alias for light_black) along with 8 ANSI text attribute entries (normal, default, bold, underline, blink, reverse, hidden, nothing). The named colors in this list are the ones accepted by the -c flag when specifying series colors in other commands. The remaining 256 entries (indices 0 through 255) show the extended ANSI palette: 0-7 standard, 8-15 bright, 16-231 a 6x6x6 color cube, and 232-255 a grayscale ramp.

The colors command does not read from stdin, so it can be run without piping any data into it. This makes it a useful diagnostic tool for checking your terminal’s color rendering before plotting.