Created
January 21, 2019 12:02
-
-
Save hexdefined/477e457c3ed2a6932f547385e43dda41 to your computer and use it in GitHub Desktop.
Colour picker
This file contains 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
maim -u -g $(slop -t 0 -f '1x1+%x+%y') | convert - rgb:- | od -An -tu1 -v -w3 | while read r g b; do | |
hex="#$(printf '%02x' $r $g $b)" | |
printf "\033[48;2;$r;$g;${b}m \033[0m \033[1m\033[37m$hex\033[0m\n" | |
printf $hex | xsel -b | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment