Created
December 8, 2025 10:32
-
-
Save dolftax/48e11b3a8c933a8325bfd43f40d47547 to your computer and use it in GitHub Desktop.
Terminal color test script
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
| #!/bin/bash | |
| echo "=== Terminal Info ===" | |
| echo "TERM: $TERM" | |
| echo "COLORTERM: $COLORTERM" | |
| echo "TERM_PROGRAM: $TERM_PROGRAM" | |
| echo "Colors: $(tput colors)" | |
| echo "" | |
| echo "=== ANSI 16 Colors ===" | |
| for i in {0..7}; do printf "\e[48;5;${i}m %d \e[0m" $i; done | |
| echo "" | |
| for i in {8..15}; do printf "\e[48;5;${i}m %d \e[0m" $i; done | |
| echo "" | |
| echo "" | |
| echo "=== Foreground Colors ===" | |
| for c in {30..37}; do printf "\e[${c}m▓▓▓\e[0m "; done | |
| echo "(normal)" | |
| for c in {90..97}; do printf "\e[${c}m▓▓▓\e[0m "; done | |
| echo "(bright)" | |
| echo "" | |
| echo "=== Sample Text ===" | |
| printf "\e[1mBold\e[0m \e[2mDim\e[0m \e[4mUnderline\e[0m \e[7mReverse\e[0m\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment