Created
March 26, 2019 01:34
-
-
Save meskarune/0c0e784273de72a00b78a64851fa3991 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
FG=(7 0 1 2 3 4 5 6) | |
BG=(0 8 1 9 2 10 3 11 4 12 5 13 6 14 7 15) | |
#echo " $(tput setaf 7)█$(tput bold)█ $(tput sgr0)White" | |
#echo " $(tput setaf 0)█$(tput bold)█ $(tput sgr0)Black" | |
#echo " $(tput setaf 1)█$(tput bold)█ $(tput sgr0)Red" | |
#echo " $(tput setaf 2)█$(tput bold)█ $(tput sgr0)Green" | |
#echo " $(tput setaf 3)█$(tput bold)█ $(tput sgr0)Yellow" | |
#echo " $(tput setaf 4)█$(tput bold)█ $(tput sgr0)Blue" | |
#echo " $(tput setaf 5)█$(tput bold)█ $(tput sgr0)Magenta" | |
#echo " $(tput setaf 6)█$(tput bold)█ $(tput sgr0)Cyan" | |
LINE="" | |
COLOR="" | |
for bg_color in ${BG[@]}; do | |
COLOR="$COLOR$(tput setab $bg_color) $(tput sgr0)" | |
done | |
for fg_color in ${FG[@]}; do | |
for bg_color in ${BG[@]}; do | |
LINE="$LINE$(tput setab $bg_color) $(tput setaf $fg_color)█$(tput bold)█ $(tput sgr0)" | |
done | |
LINE="$LINE\n" | |
done | |
printf "\n black red green yellow blue magenta cyan white\n\n" | |
printf "$COLOR\n$LINE$COLOR\n" | |
echo | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment