Print console colors
If you check tput colors
, you'll probably see that the answer is 8. The way to show the bright colors is by tput bold
.
This shows all 8x8x2 combinations of foreground and background, normal and bold.
for cmd in sgr0 bold; do
tput $cmd
for i in $(seq 0 7); do
for j in $(seq 0 7); do
tput setaf $i; tput setab $j; echo -n " $i,$j "
done
tput sgr0; echo; tput $cmd
done
done