microsoft/PowerToys

Color Picker activation behavior: Quickly select color code format without launching Editor

Open

#26,605 opened on Jun 2, 2023

View on GitHub
 (2 comments) (0 reactions) (0 assignees)C# (7,978 forks)batch import
Help WantedIdea-EnhancementNeeds-Team-ResponseNeeds-TriageProduct-Color Picker

Repository metrics

Stars
 (133,154 stars)
PR merge metrics
 (Avg merge 14d 20h) (117 merged PRs in 30d)

Description

Description of the new feature / enhancement

This would be a 4th option for Activation Behavior that is kind of in between "Pick a color and open editor" and "Only pick a color." When a color is picked, instead of immediately saving it to clipboard in the default format, the user is presented with a dropdown list at the location of the mouse cursor (perhaps visually similar to a context menu) that lists the different color format names and the value of the picked color (basically how the color is listed in multiple formats in the Editor view, except make it a more visually-compact dropdown list). In the dropdown, the user can select their desired format with the mouse, or navigate down the list with arrow-keys/mouse-scroll and hit Enter. The color code is then copied to clipboard in the selected format.

An even more streamlined implementation would be to enhance the "Only pick a color" mode, where it keeps its current behavior when you pick a color with a mouse-click, but if you hold down the mouse (aka longpress), then it opens the format-selection dropdown as described above. (A middle-ground between these options, and the one that is probably simplest to implement codewise, could be an optional toggle for "Only pick a color" mode, where either a long-mousedown or right-click from picker mode will launch the full Editor. This would depend on #5195/#24450 so that the clicks don't bubble through to whatever's under the cursor.)

Scenario when this would be used?

Quicker and less visually-busy compared to launching the full Editor panel. Especially useful when a user typically uses just one color format (and therefore would want "Only pick a color" mode), but they occasionally need a different format, and want to be able to quickly copy a picked color in that format without having to change the Color Picker behavior settings.

Supporting information

Example of dropdown appearance

image

Contributor guide