scripts / colors /
6473ddb 8 years ago
1 contributor
21 lines | 0.455kb
#!/bin/bash
bg_max=48
bg_min=40
fg_min=30
fg_max=39
format_min=0
format_max=9

function draw () {
    for ((format=$format_min; format <= $format_max; format++)); do
		for ((fg=$fg_min; fg <= $fg_max; fg++)); do
            echo -en "$1\e[${format};${fg}m\\\e[${format};${fg}m\e[40m\e[0;30m  "
        done
        echo -e "\e[0m"
    done
}

for ((bg=$bg_min; bg <= $bg_max; bg++)); do
    echo -e "\n\e[4;38mfond \\\e[${bg}m:"
    draw "\e[${bg}m"
done