microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.73k stars 6.58k forks source link

Color picker returns incorrect values when an icc color profile is used on monitor #11585

Open nicolasprigent opened 3 years ago

nicolasprigent commented 3 years ago

Microsoft PowerToys version

0.37.2

Running as admin

Area(s) with issue?

ColorPicker

Steps to reproduce

If your monitor has an icc profile applied, the return values differs from what is actually stored in the program that displays the color.

✔️ Expected Behavior

It seems to be a problem on screenshots in general and I guess color picker uses screenshot functionnality at some point. If I do a screenshot when having an icc profile, I have to go to photoshop and assign my icc monitor profile on the image, then convert to srgb to get the good values back.

There should be 2 options for icc profile for color picker :

The value displayed in the color picker would be first assigned in the color space of the monitor then converted to the output icc profile choosen.

As a bonus, there should be an hotkey to do this color assign/convert to images in the clipboard. So you can make a screenshot, do the color correction with hotkey directly in the clipboard, then just paste the image in the document.

❌ Actual Behavior

As an example I color picked the red "Issue-Bug" label on the right of this bug report.

The color picked value is returned as : rgb(199, 55, 23) But in the source of the page, the correct value is : rgb(230, 0, 0)

Other Software

No response

niels9001 commented 3 years ago

@martinchrzan could this be an API/platform limitation?

martinchrzan commented 3 years ago

Yep it is, we are using the same API as the regular print screen functionality. We would have to read the current color profiles for the current screen and do a conversion. Doable, but quite a lot of work.

nicolasprigent commented 3 years ago

Well, people that uses color profiles on their monitor are people that are expecting correct colors in the entire workflow. This makes the color picker unusable for me. But yes, it's clearly not just this tool that would need the correction. I've got this problem with screenshot programs (lightshot or built-in screenshot program in windows). I guess it's maybe more something that should be fixed directly in the OS. For people like me that works on webdesign, or have to make documentations about programs, I have to rework all my screenshots before pasting them in word for example. And if I paste screenshots directly into emails, I often get "the colors are wrong" as the only response :) .

nicolasprigent commented 3 years ago

I've made a bug report on windows 10 feedback hub also. I hope this will be seen among all other suggestions that there is.

nicolasprigent commented 3 years ago

Here is the bug report (it opens feedback hub app on windows 10) : https://aka.ms/AActizq

crutkas commented 3 years ago

it is a known limitation as of now as @martinchrzan stated. If it is a system wide color profile, we may be able to tweak.

arafathossainadi commented 6 months ago

I have realized that the ICC profile of my primary monitor was causing this issue. So while picking colors I drag the reference color to secondary monitor and then use the color picker to pick the accurate hex code.

PesBandi commented 3 months ago

Hi @niels9001, I have a quick UX question for you. What's your opinion on adding a warning to the Color Picker settings page that says something along the lines of "Color Picker may be inaccurate if you use a color profile"?