2006-11-26 04:11:12 -07:00
|
|
|
#!/usr/bin/perl
|
2007-06-15 13:29:55 -06:00
|
|
|
# $XTermId: 256colors.pl,v 1.3 2006/09/29 21:49:03 tom Exp $
|
2006-11-26 04:11:12 -07:00
|
|
|
# $XFree86: xc/programs/xterm/vttests/256colors.pl,v 1.1 1999/07/11 08:49:54 dawes Exp $
|
2007-06-15 13:29:55 -06:00
|
|
|
#
|
|
|
|
# This uses 33 print-lines on an 80-column display. Printing the numbers in
|
|
|
|
# hexadecimal would make it compact enough for 24x80, but less readable.
|
2006-11-26 04:11:12 -07:00
|
|
|
|
|
|
|
for ($bg = 0; $bg < 256; $bg++) {
|
2007-06-15 13:29:55 -06:00
|
|
|
# print "\x1b[9;1H\x1b[2J";
|
2006-11-26 04:11:12 -07:00
|
|
|
for ($fg = 0; $fg < 256; $fg++) {
|
|
|
|
print "\x1b[48;5;${bg}m\x1b[38;5;${fg}m";
|
|
|
|
printf "%03.3d/%03.3d ", $fg, $bg;
|
|
|
|
}
|
|
|
|
print "\n";
|
2007-06-15 13:29:55 -06:00
|
|
|
sleep 1;
|
2006-11-26 04:11:12 -07:00
|
|
|
}
|