Created
June 23, 2013 03:27
-
-
Save jcyamo/5843658 to your computer and use it in GitHub Desktop.
Script for echoing hex values of current term colors
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 | |
colors=($(xrdb -query | sed -n 's/.*color\([0-9]\)/\1/p' | sort -nu | cut -f2)) | |
echo -e "\e[1;37m | |
Black Red Green Yellow Blue Magenta Cyan White | |
──────────────────────────────────────────────────────────────────────\e[0m" | |
for i in {0..7}; do echo -en "\e[$((30+$i))m ${colors[i]} \e[0m"; done | |
echo | |
for i in {8..15}; do echo -en "\e[1;$((22+$i))m ${colors[i]} \e[0m"; done | |
echo -e "\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment