Skip to main content
100%

Gist 895787

✓ Published0🌍 Public
XXXX
Last edited Mar 31, 2011
Created on Mar 31, 2011

This example displays all 256 xterm-256 color codes as colored text samples, each labeled with its numeric index. The script prints each color name “cool” in the corresponding ANSI escape sequence, using the `\e[38;5;` prefix to set the foreground color and `\e[0m` to reset it. The output is rendered directly to the terminal, showing the full palette in sequential order from 1 to 256. The Ruby code relies on standard output formatting rather than a visualization library.

AI-generated description

Similar vizzes