···1313usage() {
1414 printf '%s\n' "usage: ${0##*/} [options]" \
1515 "options:" \
1616- " -c - copy the color code to the clipboard" \
1616+ " -c - copy to clipboard" \
1717 " -h - display usage statement" \
1818- " -n - send a notification with the color code" \
1919- " -o - open an image with the color and the color code" \
2020- " -r - display the color code as an rgb value" \
2121- " -x - display the color code as a hexcode value (default)"
1818+ " -n - send a notification with the color" \
1919+ " -o - open the color as an image" \
2020+ " -r - display the color as an rgb value" \
2121+ " -x - display the color as a hexcode value (default)"
2222}
23232424# Parse arguments
···6262[ $color_type ] || color_type="hex"
63636464# Get a screenshot of the pixel
6565-grim -s 1 -g "$(slurp -p)" "/tmp/${0##*/}/temp.png"
6565+grim -s 1 -g "$(slurp -b 00000000 -s 00000000 -w -1 -p)" "/tmp/${0##*/}/temp.png"
66666767case $color_type in
6868 hex ) color=$(convert "/tmp/${0##*/}/temp.png" -format "%[hex:p]\n" info:) ;;