From 8f8792508e7d1e7f34d279692da22c17d1607913 Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 22 May 2020 17:57:37 -0400 Subject: add more commands --- termcolor_256.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 termcolor_256.sh (limited to 'termcolor_256.sh') 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]" -- cgit v1.2.3