colours (1344B)
1 #!/usr/alt/bin/rc 2 fn colourline { 3 for (c) printf '\e[48;5;%dm%03d' $c $c 4 printf '\e[0m \n' 5 } 6 7 colourline `{seq 0 15} 8 for (i in `{seq 0 5}) colourline `{seq `{expr $i '*' 36 + 16} `{expr $i '*' 36 + 51}} 9 colourline `{seq 232 255} 10 11 # Print the 16 configured terminal colors. 12 13 printf '\n' 14 printf '# | ASCII | Name | Base16\n' 15 printf '---------------------------------------------\n' 16 printf ' 0 |[0;40m 30 / [0m| black | base0 \n' 17 printf ' 1 |[0;41m 31 / [0m| red | base8 \n' 18 printf ' 2 |[0;42m 32 / [0m| green | base11 \n' 19 printf ' 3 |[0;43m 33 [0m| yellow | base10 \n' 20 printf ' 4 |[0;44m 34 [0m| blue | base13 \n' 21 printf ' 5 |[0;45m 35 [0m| magenta | base14 \n' 22 printf ' 6 |[0;46m 36 [0m| cyan | base12 \n' 23 printf ' 7 |[2;47m 37 [0m| white | base5 \n' 24 printf ' 8 |[0;100m 90 [0m| brightblack | base3 \n' 25 printf ' 9 |[0;101m 91 [0m| brightred | base9 \n' 26 printf '10 |[0;102m 92 [0m| brightgreen | base1 \n' 27 printf '11 |[0;103m 93 [0m| brightyellow | base2 \n' 28 printf '12 |[0;104m 94 [0m| brightblue | base4 \n' 29 printf '13 |[0;105m 95 [0m| brightmagenta | base6 \n' 30 printf '14 |[0;106m 96 [0m| brightcyan | base15 \n' 31 printf '15 |[2;107m 97 [0m| brightwhite | base7 \n'