Google Chrome for Mac, CSS colors and display profiles
- by Trevor Burnham
So, I'm aware that some browsers correct the colors in images in accordance with system settings, and that browsers differ in how they do this. But I'm very surprised when a color specified in a stylesheet appears different from one browser to another on the same system.
With the latest Safari and Firefox, if I draw a div with background: #885500, I get a box with that color (as confirmed by the native DigitalColor Meter app):
But when I load the same page in Chrome (Mac version 12.0.742.91) on the same system, a MacBook Pro with the default "Color LCD" display profile set, I get a noticeably different-colored box (DigitalColor Meter reports #a34d00—much more red, a bit less green):
I tried a few different color profiles, and found that the color reported by DigitalColor Meter changed under Chrome. It stays constant in Safari.
What's going on? Is it that Chrome is adjusting its colors depending on the system's display profile, or is it that Safari and Firefox are doing so? Does this happen under other operating systems, or is it purely a Mac phenomenon? And is there any way, from CSS/JavaScript, to detect/prevent this behavior so that colors are consistent across modern browsers on the same system?