microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.6k stars 6.52k forks source link

SVG preview inaccurate color respresentations #19812

Open Sigma-Erebus opened 2 years ago

Sigma-Erebus commented 2 years ago

Microsoft PowerToys version

v0.61.0

Running as admin

Area(s) with issue?

ColorPicker, SVG Preview, SVG Thumbnail

Steps to reproduce

  1. Create SVG with green background (HEX 149911), and white text on top.
  2. Preview SVG within file explorer
  3. use color picker to pick the background color from the preview
  4. color picker gets result that is not the original color defined in the SVG (in my case ~HEX d29b22). - When the SVG is opened, of course the correct color gets displayed again.

✔️ Expected Behavior

I expect the SVG preview to display the colors defined in the SVG. So that quickly reusing a color used within an SVG is possible. And i don't have to open up the SVG.

❌ Actual Behavior

Color displayed is different to the color defined in the SVG file.

Other Software

Windows Explorer (Windows 10 build 19044.1826)

Jay-o-Way commented 2 years ago

Do you happen to use any color correction or red tint? Color Picker can't "see through" that.

Jay-o-Way commented 2 years ago

A screenshot would also help

Sigma-Erebus commented 2 years ago

Hi Jay,

No I don't have any color correction being used. Especially as it does pick up the color correctly when the file is opened up. Here are some screenshots of the issue:

image This is the SVG opened with Internet Explorer (IE, Chrome, Firefox and Adobe Illustrator all display it the same)

image This is the same SVG in File Explorer's Preview pane, and as you can see the color reported by the color picker is not the same hex code

image Thumbnail has the same issue as the preview pane.

Jay-o-Way commented 2 years ago

I see your screenshots, but when I download your first screenshot and test it on my pc, it all returns the same, correct value. Care to share your original file?

Sigma-Erebus commented 2 years ago

Oh yes, abosolutely, here you go schoolproject :

Sigma-Erebus commented 2 years ago

I hope that displays correctly, if not I can also zip it up and send it once more

Jay-o-Way commented 2 years ago

Thanks for the image. Did some very quick test myself and I have even different results. Have a look at my recording on YouTube.

@Aaron-Junker do you know if that conclusion is correct?

Sigma-Erebus commented 2 years ago

Yeah, especially the edges are jagged. Compression would make sense for that. Though compression shouldn't change the color values, especially those in the solid parts of the image, right??

at least the preview doesn't really suffer from such compression artefacting as much.

on a side note: Goeie keuze voor standaardtaal :)

Sigma-Erebus commented 2 years ago

I don't know if the different results might have something to do with windows color scheme? As I'm using Dark mode, yet from your screenshot it appears you're using Light mode.

Jay-o-Way commented 2 years ago

I don't know if the different results might have something to do with windows color scheme?

Nah, this is about the colors inside the image. It's an unwanted artefact. You can enlarge the area by scrolling the mouse wheel.

Goeie keuze voor standaardtaal :)

Tsja, Nederlands hè :P

Sigma-Erebus commented 2 years ago

Could it alternatively be that the preview and thumbnail operate on a different color space?? file might be 10 bit color range, where the preview might only be 8 bit or something?

Tsja, Nederlands hè :P Gotta say i prefer english for my devices tho... But anyways

Sigma-Erebus commented 2 years ago

whoops, didn't know that was a button, thought it was only a dropdown, sorrey