microsoft/PowerToys

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

Open

#26,605 创建于 2023年6月2日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)C# (7,978 fork)batch import
Help WantedIdea-EnhancementNeeds-Team-ResponseNeeds-TriageProduct-Color Picker

仓库指标

Star
 (133,154 star)
PR 合并指标
 (平均合并 14天 20小时) (30 天内合并 117 个 PR)

描述

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

贡献者指南