Script to display all terminal colors
Here is my solution with Bash only:
for x in {0..8}; do
for i in {30..37}; do
for a in {40..47}; do
echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "
done
echo
done
done
echo ""
One-liner:
for x in {0..8}; do for i in {30..37}; do for a in {40..47}; do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "; done; echo; done; done; echo ""
Here's a picture in Cygwin:
A simple one-liner that should work for most people.
msgcat --color=test
You can also use the colortest
package.
Install it with this command:
sudo apt-get install colortest
It provides several commands which you can use, depending on how many colors you want:
colortest-16 colortest-16b colortest-256 colortest-8
Example output from colortest-16b
: