Skip to content

Instantly share code, notes, and snippets.

@hexdefined
Created January 21, 2019 12:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hexdefined/477e457c3ed2a6932f547385e43dda41 to your computer and use it in GitHub Desktop.
Save hexdefined/477e457c3ed2a6932f547385e43dda41 to your computer and use it in GitHub Desktop.
Colour picker
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