I was pointed to this article about color spaces in Web browsers. The ultimate point of the article, that it would be good for a Web browser to be “Color Smart”, i.e., to support not only embedded color profiles in images but also to correct unprofiled images to sRGB is a sound one. However, the author takes a few potshots at Web browsers on the Mac, and I thought I’d respond to make it clear what the technical hurdles are with this problem.
First of all, if you correct unprofiled images to sRGB, you have to correct all drawing to sRGB. This includes everything drawn by CSS (borders, backgrounds, text). This is not difficult to do under the hood, although it is difficult to do it with no performance regression in our benchmarks at all. In fact we even tried this during the Tiger development cycle (just correcting everything drawn to sRGB), but it slowed us down.
The big hurdle that we ran into, though, was with the drawing we did not control, namely the Flash plug-in. The problem is that designers specify colors in Flash and colors in CSS in the Web page, and they expect those colors to match. Because Flash’s drawing isn’t correcting to sRGB, if we did it in Safari, there would be color mismatches all over the place. These mismatches look far worse than if we just don’t correct at all.
(This mismatch with plug-ins is presumably the reason that this feature was not enabled by default in Mac IE.)