6

I have the following HTML snippet open in Safari. Digital Color Meter reports the color as #FEDC53.

<!DOCTYPE html>
<html>
<head>
    <title>Broken Colors?</title>
</head>
<body style="background-color: #FFDD44">
Hello, World!
</body>
</html>

Is Safari displaying the incorrect color? Or is Digital Color Meter displaying reading the wrong color? How do I find out? How do I fix this?

enter image description here

Comparative true FFDD44 swatch, with sRGB profile embedded.

enter image description here

  • On that picture, my meter gives F8DE5A in native, FFDE44 in sRGB, on an sRGB calibrated monitor. I added a swatch of true FFDD44 with embedded sRGB profile for comparison. [which also now reads as FFDE44 suggesting it's time I recalibrated;) Is your monitor calibrated & if so, to what? – Tetsujin Oct 13 '16 at 7:19
3

Digital Color Monitor is working correctly.

I created your test page and displayed it in Google Chrome v53.0.2785.143, and it reported FFDD44.

The same page in Safari reported, for me, F4E14F. Looking at them next to each other, they don't even look like the same color. (In the screenshot, Chrome is the outer window, Safari the inner.)

enter image description here

It appears that the reason is gamma correction in the browser. See the Gamma Test Page. This page displays correctly (in the sense that each block is a solid color) in Safari v9.1.3, whereas it displays incorrectly in Chrome v53.0.2785.143. See screenshots below. Based on the information on the Gamma Test Page, Safari is correctly gamma-correcting CSS colors.

enter image description here enter image description here

  • 1
    Nice answer. Something slightly puzzles me [not enough for a separate question;) My screen is hardware calibrated to sRGB. All the values on that test page are within 1, on the interior & exterior colours if I use sRGB in the DCM. If I use Native, they're miles out. Is Native only useful for an uncalibrated monitor, relying on the default profile? – Tetsujin Oct 13 '16 at 7:03
  • Looks like Chrome is properly correcting for ICC profiles now (tested on v77). It shows the same corrected color values as Safari now. – wisbucky 2 days ago
  • @Tetsujin "Is Native only useful for an uncalibrated monitor, relying on the default profile?" Pretty much. See apple.stackexchange.com/questions/256995/… – wisbucky 2 days ago
2

What's happening is that Digital Color Meter (and all color droppers) is reading the color value AFTER it has been adjusted for your display's ICC Color Profile. See how it shows "Color LCD" in the bottom right box? Despite the generic sounding name, that is the ICC Color Profile specifically for Macbooks.

Here's a data flow diagram:

#FFDD44 (original)
   ↓
#FEDC53 (adjusted for Color LCD display profile)

The term "Display native values" is misleading because it sounds like it's going to display the original values, but it doesn't. Apparently, color droppers cannot get the original values. So there are 2 solutions:

1. Quick and dirty solution

Change Digital Color Meter to "Display in sRGB" mode. What that does is re-convert the adjusted value to sRGB (assuming that's what the color space of the original image is). The problem with this is due to the double conversion and rounding errors, sometimes you will not get the exact original value back! (In this case, it was the same, but if you try more colors, you'll find some that are slightly off).

#FFDD44 (original)
   ↓
#FEDC53 (adjusted for Color LCD display profile)
   ↓
#FFDD44 (convert back to sRGB)

2. Exact solution

If you want to guarantee the exact original values, you should set Digital Color Meter to "Display native values", then change your System Preferences > Displays > Color > sRGB. Verify that Digital Color Meter now shows "sRGB..." in the lower right box. Since that matches the color space of the original source, no adjustment will be made, so "Display native values" will always be the exact original values. (You should remember to change it back to "Color LCD" afterwards. Or if you don't care, leave it in "sRGB".)

#FFDD44 (original)

(no adjustment since display profile sRGB matches the original color space)

See this answer for more details.

  • I Love colour management... or not ;) Thanks for the explanation. I tested setting the display to sRGB & yes, the numbers matched up - it looked horrible. but the numbers matched. Back to my calibrated profile & they just about match [within 1] to sRGB on the Meter, though it looks far better. I'll be sure to ask you about all my colour workflow issues ;-) – Tetsujin 2 days ago

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .