Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 119cb0d962
Fetching contributors…

Cannot retrieve contributors at this time

executable file 23 lines (18 sloc) 0.397 kB
#!/bin/bash
[[ -z $1 ]] && {
printf "Usage: %s <XResources color file>" "${0##*/}" >&2
exit 1
}
hex2dec() {
for val; do
printf "%3d " "0x$val"
done
printf "\n"
}
printf "\t\t%3s %3s %3s\n" "R" "G" "B"
while read line; do
[[ ! $line =~ ^\*color ]] && continue
printf "${line% *}\t"
hexcode=${line/\*color* /}
hex2dec ${hexcode:1:2} ${hexcode:3:2} ${hexcode:5:2}
done < $1
Jump to Line
Something went wrong with that request. Please try again.