PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Color Picker - auto detect format specified by user (% or float)

Open dcog989 opened this issue 7 months ago • 0 comments

Description of the new feature / enhancement

Enhance Color Picker to detect and use the unit format specified by the user for percentage vs float values.

This can be used for e.g. hsl(h s% l% / a), where a would output 0 to 1 float values, and a% would output 0% to 100% values.

RGB, OkLCh, and others contain values that can be either float or percentage.

Scenario when this would be used?

  1. In Color Picker > Color Formats the user has rgb(%Re %Gr %Bl) which results in displayed color e.g. rgb(224 224 224).
  2. The user then edits format to rgb(%Re% %Gr% %Bl%). This will now result in displayed color e.g. rgb(88% 88% 88%).

Supporting information

Discussion begins in https://github.com/microsoft/PowerToys/issues/23724

dcog989 avatar May 26 '25 15:05 dcog989