]>
Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/colortable
3 # Print a color table of ANSI colors (normal+bright)
7 for ($bright = 0; $bright < 2; $bright++) {
10 printf("\x1b[0m %2s ",$bgc);
11 for ($fg=30; $fg<=37; $fg++) {
12 $fgc = $bright == 1 ? ($fg+60) : $fg;
13 printf("\x1b[%sm\x1b[%sm %2s ", $bgc, $fgc, $fgc);
18 printf("\x1b[0m %3s ",$bgc);
19 for ($fg=30; $fg<=37; $fg++) {
20 $fgc = $bright == 1 ? ($fg+60) : $fg;
21 printf("\x1b[%sm\x1b[%sm %2s ", $bgc, $fgc, $fgc);
29 for ($bg=0; $bg<=0; $bg++) {
32 # Background 40-47 (standard)
33 for ($bg=40; $bg<48; $bg++) {