summaryrefslogtreecommitdiff
path: root/bin/colortable.sh
blob: 66ebcc8ea71d2169accd64ca7081908cba2267fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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