Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # Author: Todd Larason <jtl@molehill.org>
- # $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 di
- ckey Exp $
- # use the resources for colors 0-15 - usually more-or-less a
- # reproduction of the standard ANSI colors, but possibly more
- # pleasing shades
- # colors 16-231 are a 6x6x6 color cube
- for ($red = 0; $red < 6; $red++) {
- for ($green = 0; $green < 6; $green++) {
- for ($blue = 0; $blue < 6; $blue++) {
- printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
- 16 + ($red * 36) + ($green * 6) + $blue,
- ($red ? ($red * 40 + 55) : 0),
- ($green ? ($green * 40 + 55) : 0),
- ($blue ? ($blue * 40 + 55) : 0));
- }
- }
- }
- # colors 232-255 are a grayscale ramp, intentionally leaving out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement