diff options
Diffstat (limited to 'termcolor_256.sh')
-rwxr-xr-x | termcolor_256.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/termcolor_256.sh b/termcolor_256.sh new file mode 100755 index 0000000..8453b0c --- /dev/null +++ b/termcolor_256.sh @@ -0,0 +1,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]" |