Created
March 28, 2018 12:06
-
-
Save dezza/2cd70123175576d2c49578e4a554ad2c to your computer and use it in GitHub Desktop.
Original colortest? Or better hehe.
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
#!/bin/bash | |
T='gYw' # The test text | |
echo "Background: 0 1 2 3 4 5 6 7" | |
echo "Foreground:" | |
for FG in 0 1 2 3 4 5 6 7 | |
do | |
echo -en " ${FG} $(tput setaf ${FG}) $T " | |
for BG in 0 1 2 3 4 5 6 7 | |
do | |
echo -en "$(tput setaf ${FG})$(tput setab ${BG}) $T "; | |
echo -en "$(tput sgr0) " | |
done | |
echo | |
# Do it again, in bold: | |
echo -en " ${FG}bold $(tput bold)$(tput setaf ${FG}) $T " | |
for BG in 0 1 2 3 4 5 6 7 | |
do | |
echo -en "$(tput bold)$(tput setaf ${FG})$(tput setab ${BG}) $T "; | |
echo -en "$(tput sgr0) " | |
done | |
echo | |
done | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment