generate-colors - Generate color test patterns for ANSI terminal support
generate-colors type [type ...]
Perl 5.6 and Term::ANSIColor 4.00 or later.
generate-colors generates test and demonstration tables for ANSI color and text attribute support for eight-color, sixteen-color, and 256-color terminal emulators. The type command-line argument specifies a table to print to standard output. Multiple type arguments can be specified, and each of those tables will be printed in the order given.
The supported values of type are:
The basic eight ANSI colors as both foreground and background, as well as examples of bold for each color and a separate table of the non-color text attributes supported by Term::ANSIColor.
The "bright" ANSI colors from the sixteen-color palette (colors 8 through 15) on all possible color backgrounds (colors 0 through 15).
All of the 216 colors in the 256-color palette that are specified by three RGB values (each from 0 to 5) as foreground colors, shown against three possible backgrounds (rgb000, rgb222, and rgb555).
The same as
fg256except showing all of the background colors for three different possible foreground colors (rgb000, rgb222, and rgb555).
The 24 grey-scale colors in the 256-color palette, shown as both foreground and background.
The 256-color palette devotes the lowest 16 colors to duplicating the colors from the sixteen-color palette. This test table shows all sixteen as both foreground and background colors, but using the 256-color escape sequence format to specify them. It's possible that this test will not work with some emulators that support
brightif 256-color support is not implemented.
This script is an example in the Term::ANSIColor distribution, available from its web site at https://www.eyrie.org/~eagle/software/ansicolor/ or from CPAN.
Original script written by Kurt Starsinic. It was restructured and updated by Russ Allbery to add the
bright test tables.
Copyright 2012 Russ Allbery <firstname.lastname@example.org>. Copyright 2012 Kurt Starsinic <email@example.com>. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.