From 3db4d97c18405f26fc609cca708fae29259da9f9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 25 Nov 2020 16:52:58 +0100 Subject: Add colortable script. --- bin/colortable.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bin/colortable.sh (limited to 'bin') 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 -- cgit v1.2.3