aboutsummaryrefslogtreecommitdiff
path: root/termcolor_256.sh
blob: 8453b0ca3e172df3ce85cf7259941e2834c79f3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
# http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal
echo "ColorTag: available color code"
echo
for i in {0..255} ; do
    printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
    if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
        printf "\n";
    fi
done
read -n 1 -s -r -p "[Press any key to exit]"