Search This Blog

2015-03-24

shell colors

apt-get install colortest

colortest-16b

... or...

IFS="
"

for x in 0 1 4 5 7 8
  do for i in `seq 30 37`
    do for a in `seq 40 47`
      do echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "
      done; echo; done; done;

... or...

IFS="
"

# bellow 16 are the console colors
# above 231 is gray scale

for c in `seq 16 231`; do
  echo -ne "\\033[38;5;${c}m $c \\033[0;30m \\033[48;5;${c}m $c \\033[0m"
done