Thursday, September 18, 2014

Color management in Safari is broken in Mavericks too.

I've written here about the color management problems with Lightroom on Mavericks before here and here. With the recent release of OS X 10.9.5, color management now appears to work right in Aperture and in iPhoto. However, it is still broken in Safari and preview. This is quite disturbing. Amazingly, both Chrome and Firefox do the color management right. It appears that Safari has built-in code to deal with sRGB tagged images because it treats them differently than any other embedded profile. It ignores the sRGB gamma curve and assumes it is the same as your display gamma profile! Below is a little test link for your pleasure to illustrate the problem. Rollover to switch between adobeRGB and sRGB tagged images. The sRGB image will have the darkest patches blocked completely in Safari. The adobeRGB image is correctly displayed. In Chrome on Mac OS X, since it is color managed, you will see only a very subtle difference due to the gammas being different in adobeRGB and sRGB and there therefore being subtle bit errors but both displays are essentially correct. The same is true for Firefox.

Mouse over to see the problem. Loading the alternate image might take a few seconds. You won't see it unless you are on Mavericks/Yosemite and are using Safari. If the darker patches change brightness, you have the bug.

On a well behaved browser these two images should be close to identical. Safari in Mavericks (I tested 7.1) is no longer well behaved and completely destroys the shadows. It is important to note that is also broken but in a different way. Strangely it does not display black correctly. Aperture and iPhoto do behave correctly as of 10.9.5 but used to be wrong in earlier versions of Mac OS X Mavericks. Photoshop, since it uses its own color management routines, behaves correctly too. Lightroom only behaves correctly in the Library views as I have shown before. In Develop it has the same blocked shadow problem as you see in Safari. This problem is non-existent in 10.8.

Edit: Before any confusion arises, I need to explain the numbers in the images above. The sRGB version of the image shows the values of r,g,and b in the sRGB color space as encoded in the file. The adobeRGB version is the same file, but converted to adobeRGB color space in Photoshop. The numbers are still the r,g,b values of the patches in sRGB space, but the file is simply encoded in adobeRGB. The display should therefore be identical in correctly color managed environments as it is in Photoshop. EDIT:10/17/14. Finally got around to installing Yosemite. Unsurprisingly, this is still broken in Safari like it is in Mavericks and the Webkit nightlies. Unfortunate. Strange that this is not getting picked up as this bug is present on every single Mac that has Mavericks or Yosemite installed. No matter whether it is hardware calibrated or not. Mac OS pre Mavericks did not have this bug.


  1. I've got a fresh copy of 10.9.5 installed - had a disk crash and had to reinstall everything, but I'm not seeing the issue. As I roll over the image in Safari all that changes is the caption going from "s" to "adobe." I'm running Safari Version 7.1 (9537.

    1. do you see the top row of patches? If you don't, your screen is probably not well calibrated and you won't see the change because the shadows are too dark to start.