Last active
September 29, 2022 02:14
-
-
Save iwill/c326ffab5bc005e4d54b to your computer and use it in GitHub Desktop.
color-legend.sh
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 | |
# http://ss64.com/bash/echo.html | |
echo -n -e " " | |
for j in {40..47}; do | |
echo -n -e " bj-$j " | |
# Reset text attributes to normal without clear | |
tput sgr0 | |
done | |
echo | |
for i in {30..37}; do | |
echo -n -e "fg-$i" | |
for j in {40..47}; do | |
echo -n -e ' \x1b[00;'$i';'$j'mTEXT' | |
echo -n -e ' \x1b[01;'$i';'$j'mTEXT' | |
tput sgr0 | |
done | |
echo | |
done | |
# fg-30/bg-40 black | |
# fg-31/bg-41 red | |
# fg-32/bg-42 green | |
# fg-33/bg-43 yellow | |
# fg-34/bg-44 blue | |
# fg-35/bg-45 magenta | |
# fg-36/bg-46 cyan | |
# fg-37/bg-47 white |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment