aboutsummaryrefslogtreecommitdiff
path: root/fun/bin/colors
blob: c8d527b7d4b93e893f8f30f2902a26ae5bc9f63d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

xdef="$HOME/.Xdefaults"

colors=( $( sed -re '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep 'color[01][0-9]:' | sort | sed  's/^.*: *//g' ) )

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"