Wrote a bash function to display the console colors.
But, it seems some of the colors are not possible to show that way! (?)
Also, note the strange "bright black"!
(Note: The below screendump is of xterm, but this is meant to be used in console mode. I had to use xterm to get a screendump. But it looks much the same.)
function clr () {
Color_names="bla red gre yel blu mag cya whi"
Color_arr=($Color_names)
for m in {0..15}
do
tput setaf $m
echo -n ${Color_arr[$((m % 8))]}" "
done
echo
tput sgr0
cat /sys/module/vt/parameters/default_red \
/sys/module/vt/parameters/default_grn \
/sys/module/vt/parameters/default_blu | tr "," "\t"
}
Best Answer
If you check
tput colors
, you'll probably see that the answer is 8. The way to show the bright colors is bytput bold
.This shows all 8x8x2 combinations of foreground and background, normal and bold.