#!/bin/sh
for fgbg in 38 48; do
        while [ "${color:=0}" -le 255 ]; do
        printf "\\e[${fgbg};5;%sm %3s \\e[0m" $color $color
        [ $(((color + 1) % 6)) = 4 ] && printf '\n'
                color=$((color+1))
    done
    printf '\n' && unset color
done
exit 0
