~tardypad/dotfiles

458bcd836ccc2d1578ae4eb8aa42e35270d8d258 — Damien Tardy-Panis 11 days ago 0e9d923
Fix color-picker for named colors

For the named colors, imagemagick was returning the color name instead
of the RGB values in the last part
1 files changed, 1 insertions(+), 1 deletions(-)

M files/scripts/shell/color-picker
M files/scripts/shell/color-picker => files/scripts/shell/color-picker +1 -1
@@ 6,4 6,4 @@ PIXEL_REGION=$( slurp -p 2> /dev/null )

grim -g "${PIXEL_REGION}" -t ppm - \
  | magick - -format '%[pixel:p{0,0}]' txt:- \
  | sed -n 's/0,0.* \(#[^ ]*\) .*rgb(\(.*\))/\1\n\2/p'
  | sed -n 's/0,0.* (\([^ ]*\)) *\(#[^ ]*\) .*/\2\n\1/p'