Simple and convenient tool to identify the hex value of any color on the screen. Simply click on the icon:
Your mouse will become a crosshair. Click on any color you desire and both the color and the hex value will be displayed.
Should you select the color of your bar, you will not be able to see the icon (as the icon and the bar are the same color), but you will still be able to read the hex value
- Ensure grabc is installed. For debian:
$ sudo apt-get install grabc
For more information, visit muquit/grabc
-
xclip - for copying the value to clipboard in i3
-
slurp, grim, imagemagick - for picking the color in SwayWM
-
wl-clipboard - for copying the value to clipboard in SwayWM
- Copy script to your directory of choice
- Give it execution permission (
chmod +x eyedropper
) - Add the following blocklet to your i3blocks.conf:
[eyedropper]
command=$SCRIPT_DIR/eyedropper
full_text=<span foreground="#ffffff"></span>
instance=#ffffff
markup=pango
#CLIPBOARD=true
#SWAY=true
- Change the "foreground" value in "full_text" to change the color of the initial eyedropper icon
- Change the "instance" value to change the color of the hex value displayed
Two environment variable configuration options are supported:
- CLIPBOARD=true - Copy the color value to the clipboard in addition to updating the string
- SWAY=true - Do color picking in a way that works when running in SwayWM (Wayland)