add color test script
authorAndrew Lorimer <andrew@lorimer.id.au>
Wed, 15 May 2019 07:50:26 +0000 (17:50 +1000)
committerAndrew Lorimer <andrew@lorimer.id.au>
Wed, 15 May 2019 07:50:26 +0000 (17:50 +1000)
colors.sh [new file with mode: 0755]
diff --git a/colors.sh b/colors.sh
new file mode 100755 (executable)
index 0000000..37e8e44
--- /dev/null
+++ b/colors.sh
@@ -0,0 +1,13 @@
+for fgbg in 38 48 ; do # Foreground / Background
+    for color in {0..255} ; do # Colors
+        # Display the color
+        printf "\e[${fgbg};5;%sm  %3s  \e[0m" $color $color
+        # Display 6 colors per lines
+        if [ $((($color + 1) % 6)) == 4 ] ; then
+            echo # New line
+        fi
+    done
+    echo # New line
+done
+exit 0