Created
January 2, 2022 13:19
-
-
Save FabulousCupcake/1df2d3a1f2c359285e14ffee22c0f235 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Special | |
readonly DIM="$(tput dim)" | |
readonly REVERSE="$(tput rev)" | |
readonly RESET="$(tput sgr0)" | |
readonly BOLD="$(tput bold)" | |
echo "Colors: $(tput colors) Text Number: [FG-BG]" | |
echo | |
echo " BLACK RED GREEN YELLOW BLUE PURPLE CYAN WHITE " | |
COLOR_ORDER_FULL=(0 8 1 9 2 10 3 11 4 12 5 13 6 14 7 15) | |
COLOR_ORDER_NORMAL=(0 1 2 3 4 5 6 7) | |
COLOR_ORDER_BRIGHT=(8 9 10 11 12 13 14 15) | |
for row in "${COLOR_ORDER_FULL[@]}"; do | |
FG="$(tput setaf "$row")" | |
for col in "${COLOR_ORDER_NORMAL[@]}"; do | |
BG="$(tput setab "$col")" | |
TEXT="$(printf "%02d-%02d" $row $col)" | |
printf "$BG$FG $TEXT $RESET " | |
done | |
echo | |
done | |
echo | |
for row in "${COLOR_ORDER_FULL[@]}"; do | |
FG="$(tput setaf "$row")" | |
for col in "${COLOR_ORDER_BRIGHT[@]}"; do | |
BG="$(tput setab "$col")" | |
TEXT="$(printf "%02d-%02d" $row $col)" | |
printf "$BG$FG $TEXT $RESET " | |
done | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment