diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-11-25 16:52:58 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-11-25 16:52:58 +0100 |
commit | 3db4d97c18405f26fc609cca708fae29259da9f9 (patch) | |
tree | 3d0726d4f46d7f721fa16142cb92d3f673a2204f /bin | |
parent | 27b06f375f457d0c777b6c2dcc5b2700e3109af2 (diff) |
Add colortable script.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/colortable.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/colortable.sh b/bin/colortable.sh new file mode 100755 index 0000000..66ebcc8 --- /dev/null +++ b/bin/colortable.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +for fgbg in 38 48 #Foreground/Background +do + for color in {0..255} #Colors + do + #Display the color + echo -en "\e[${fgbg};5;${color}m ${color}\t\e[0m" + #Display 10 colors per lines + if [ $((($color + 1) % 10)) == 0 ] ; then + echo -en '\n' + fi + done + echo -en '\n' +done |