| 1 |
#!/usr/bin/perl |
| 2 |
use strict; |
| 3 |
use Term::ExtendedColor qw(bg); |
| 4 |
|
| 5 |
print "Purple:\n"; |
| 6 |
for(my $i = 1; $i < 30; ++$i) { |
| 7 |
print bg("purple$i", sprintf("% 3d", $i)), end($i); |
| 8 |
} |
| 9 |
|
| 10 |
print "\nGrey:\n"; |
| 11 |
for(my $i = 1; $i < 24; ++$i) { |
| 12 |
print bg("grey$i", sprintf("% 3d", $i)), end($i); |
| 13 |
} |
| 14 |
|
| 15 |
print "\nCyan:\n"; |
| 16 |
for(my $i = 1; $i < 24; ++$i) { |
| 17 |
print bg("cyan$i", sprintf("% 3d", $i)), end($i); |
| 18 |
} |
| 19 |
|
| 20 |
print "\nMagenta:\n"; |
| 21 |
for(my $i = 1; $i < 26; ++$i) { |
| 22 |
print bg("magenta$i", sprintf("% 3d", $i)), end($i); |
| 23 |
} |
| 24 |
|
| 25 |
print "\nYellow:\n"; |
| 26 |
for(my $i = 1; $i < 18; ++$i) { |
| 27 |
print bg("yellow$i", sprintf("% 3d", $i)), end($i); |
| 28 |
} |
| 29 |
|
| 30 |
print "\nBlue:\n"; |
| 31 |
for(my $i = 1; $i < 17; ++$i) { |
| 32 |
print bg("blue$i", sprintf("% 3d", $i)), end($i); |
| 33 |
} |
| 34 |
|
| 35 |
print "\nGreen:\n"; |
| 36 |
for(my $i = 1; $i < 28; ++$i) { |
| 37 |
print bg("green$i", sprintf("% 3d", $i)), end($i); |
| 38 |
} |
| 39 |
|
| 40 |
print "\nOrange:\n"; |
| 41 |
for(my $i = 1; $i < 5; ++$i) { |
| 42 |
print bg("orange$i", sprintf("% 3d", $i)), end($i); |
| 43 |
} |
| 44 |
|
| 45 |
print "\nRed:\n"; |
| 46 |
for(my $i = 1; $i < 5; ++$i) { |
| 47 |
print bg("red$i", sprintf("% 3d", $i)), end($i); |
| 48 |
} |
| 49 |
|
| 50 |
print "\n"; |
| 51 |
|
| 52 |
|
| 53 |
sub end { |
| 54 |
my $i = shift; |
| 55 |
if($i % 30 == 0) { |
| 56 |
return "\n"; |
| 57 |
} |
| 58 |
else { |
| 59 |
return ''; |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
|
| 64 |
__END__ |
| 65 |
|
| 66 |
=pod |
| 67 |
|
| 68 |
=head1 NAME |
| 69 |
|
| 70 |
color_matrix - a matrix of available colors from Term::ExtendedColor |
| 71 |
|
| 72 |
=head1 USAGE |
| 73 |
|
| 74 |
color_matrix |
| 75 |
|
| 76 |
=head1 DESCRIPTION |
| 77 |
|
| 78 |
A color matrix showing the available colors in the Perl module L<Term::ExtendedColor>. |
| 79 |
|
| 80 |
=head1 REPORTING BUGS |
| 81 |
|
| 82 |
Report bugs on rt.cpan.org or to [email protected] |
| 83 |
|
| 84 |
=head1 AUTHOR |
| 85 |
|
| 86 |
Magnus Woldrich |
| 87 |
CPAN ID: WOLDRICH |
| 88 |
[email protected] |
| 89 |
http://japh.se |
| 90 |
|
| 91 |
=head1 CONTRIBUTORS |
| 92 |
|
| 93 |
None required yet. |
| 94 |
|
| 95 |
=head1 COPYRIGHT |
| 96 |
|
| 97 |
Copyright 2011 B<THIS MODULE>s L</AUTHOR> and L</CONTRIBUTORS> as listed above. |
| 98 |
|
| 99 |
=head1 LICENSE |
| 100 |
|
| 101 |
This library is free software; you may redistribute it and/or modify it under |
| 102 |
the same terms as Perl itself. |
| 103 |
|
| 104 |
=head1 SEE ALSO |
| 105 |
|
| 106 |
L<show_all_colors(1)> |
| 107 |
|
| 108 |
=cut |