terminal_colors is a tool to display a terminal color chart for 8, 16, 88, and 256 color terminals. It provides all the functionality of the various similar scripts found around the Web with some additional bells and whistles. It automatically detects 8, 16, 88, and 256 color capabilities (via ncurses) and displays the appropriate color charts. It can display the colors as blocks or (2D) cubes, optionally with color values overlaid in int or hex values. It can show the full rgb text string as well. It can also show the display with a vertical (default) or horizontal orientation. It has the option of additional padding and supports -h --help as well. It also works as a utility for converting between 256 and 88 color values.
Available in Debian as the 'colortest-python' package.