Skip to content

Preview hex colors in the clipboard picker - #9892

Open
nibra180 wants to merge 1 commit into
omacom:quattrofrom
nibra180:clipboard-color-swatches
Open

Preview hex colors in the clipboard picker#9892
nibra180 wants to merge 1 commit into
omacom:quattrofrom
nibra180:clipboard-color-swatches

Conversation

@nibra180

@nibra180 nibra180 commented Sep 2, 2026

Copy link
Copy Markdown

Summary

  • Show a color swatch next to clipboard entries that are a whole-entry hex value (#RRGGBB or RRGGBB), plus a large preview on the right.
  • Derive the color at display time so clipboard-history.json stays text/image and older shells keep working.
  • Round the swatches with Style.cornerRadius (Hyprland decoration:rounding); 0 stays square.

Implements the stock-picker half of #8273. Named colors, 3-digit hex, rgb()/hsl(), and hex embedded in other text are out of scope.

Test plan

  • bash test/shell.d/clipboard-test.sh
  • Copy #a954f4 and 3bd671, open the clipboard picker, confirm list chip + large preview
  • Copy ordinary text and an image; confirm no swatch
  • With decoration:rounding 0, swatches are square; with a non-zero theme rounding they match window corners
  • Paste/copy a color entry still inserts the original text

Copied #RRGGBB / RRGGBB values get a swatch in the list and a large preview, using Hyprland's decoration rounding, without changing the history file format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant