Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
add color test script
author
Andrew Lorimer
<andrew@lorimer.id.au>
Wed, 15 May 2019 07:50:26 +0000
(17:50 +1000)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Wed, 15 May 2019 07:50:26 +0000
(17:50 +1000)
colors.sh
[new file with mode: 0755]
patch
|
blob
raw
|
patch
| inline |
side by side
(parent:
77ee5f8
)
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