# Imported macOS screenshots display differently

When I take a screenshot in macOS (cmd-shift-4) and then import into a notebook, the colors tend to look washed out. Can anyone reproduce this behavior, and is there a workaround?

For example let's take a screenshot of a green disk:

Now let's import the screenshot and compare to what we see in Preview:

We can look at the image data to see it's indeed not RGBColor[0, 1, 0, 1]:

img = Import["/Users/ghurst/Dropbox/Screenshots/Screen Shot 2022-05-25 at 8.14.04 AM.png"];

ImageData[img][[500, 500]]

{0.454902, 0.988235, 0.298039, 1.}


Lastly, macOS's Digital Color Meter shows a difference:

It seems to be related to the image's color profile. Converting Green to the images profile gives roughly the same value as ImageData:

profile = Import["/Users/ghurst/Dropbox/Screenshots/Screen Shot 2022-05-25 at 8.14.04 AM.png", "ColorProfileData"];

ColorConvert[Green, profile]

RGBColor[0.458625, 0.984878, 0.298528]


Possibly the same question as here: Is Mathematica 10 color managed?

• You can see with exiftool.exe that it has Display P3 color profile. That is sRGB transfer function, but primaries and white point are different with sRGB, those are P3-D65. On windows you have to color manage everything, while on macos OS does it. The display in Safari of that png would be correct. May 25 at 18:03

This seems to be a valid workaround, but it does change the data.

Note that this works in 12.3 but not 13.0!

file = "/Users/ghurst/Dropbox/Screenshots/Screen Shot 2022-05-25 at 8.14.04 AM.png";

img = Import[file];

profile = Import[file, "ColorProfileData"];

{img, ColorConvert[img, profile -> "RGB"]}


In version 13.0 the following seems to be a valid workaround. I was surprised to see the (new in 13) WhitePoint option have no effect.

ColorConvert[ColorConvert[img, profile -> "XYZ"], "RGB"]