diff options
author | Determinant <tederminant@gmail.com> | 2020-05-22 17:57:37 -0400 |
---|---|---|
committer | Determinant <tederminant@gmail.com> | 2020-05-22 17:57:37 -0400 |
commit | 8f8792508e7d1e7f34d279692da22c17d1607913 (patch) | |
tree | de61c5bd268aa87d8b0e900b50b095ca89ce29a1 /termcolor_256.sh | |
parent | 21430f45aa2d26704c479141b48b6a5571f0c5ac (diff) |
add more commands
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]" |