Jump to main navigation, main content

Archived entry | Matt Wilcox .net

Colour profiling on the web

Safari supports colour profiling on images. This won’t mean a thing to most people, but to those that know about colour profiling and what it does the following may provide interesting food for thought.

Why I think colour profiling in Safari is (for now) a bad thing

The technologies that make the web don’t factor in colour profiling. They assume sRGB and no profile. This means that a profiled image will colour shift away from the rest of the page. A flat image of colour #0000aa; (pure blue) set against a HTML/CSS background of #0000aa; (pure blue) will normally match. You don’t see the join. But, if the image was created in CMYK (as an example) and saved with a CMYK profile, and you were to view the same page on Safari… the photo would colour shift - perhaps to #1003ac; (a different shade of blue) and suddenly you see the image - you shouldn’t. Colour shift is a problem PNGs have had, and notoriously the only solution is to strip the colour profile from the PNG with a compression utility. Only after that do the colours on the page match up.

I thought CSS3 included support for colour profiles?

That would solve the mis-match, because both the HTML/CSS and the image would shift by the same degree. However CSS3 has been in limbo for over six years. Basic elements of CSS2 aren’t supported universally yet (Oh IE, how you cause problems). Consider that the CSS2 specification is nine years old and still isn’t universally adopted in it’s completeness, and imagine how long CSS3 will take to get to a similar level of support. Remember also that computers in general are in an sRGB colour space and not calibrated. For the web, for the moment, HTML/CSS specifications have no clue about colour spaces and so use sRGB too. All images that you wish to match to the environment (i.e., the web page itself) need to be in sRGB with no colour profile (because the HTML/CSS is in sRGB with no colour profile). Applying a colour space to the photo makes it more accurate to the artists intent in isolation on browsers that support colour profiling (Safari) - but produce a colour shift from the main page. And if the vast majority of viewers are going to be in a non-managed environment (so defaulting to sRGB with no profile) there is no guarantee that the colour shift provided by colour profiling in the browser will move it toward the intended colours or further away (who knows how poor their set-up is?). Given all of that, why wouldn’t you tweak the photo to be displayed best when in an unmanaged sRGB environment if that’s what most people are using? Seems odd to require a colour profile for correct display when knowing profiling is unsupported on over 97% of viewers software, and not-implemented (or implemented poorly) for 99% of their hardware. That being the case - why bother with profiles?

For all practical purposes what I’m saying is that until CSS3 is implemented, and implemented on the majority of browsers in use at the time, colour profiling for the web will cause more harm than good, because it solves only half of the colour issue inherent on the web and thus emphasises the fact that generated content isn’t colour matched (and neither is the rest of the OS for 99% of people, making profiling somewhat futile in any case). Google “PNG colour shift” to see a history of the problem of calibrated images on a non-calibrated environment right before your eyes. The only solution is to strip the colour management aspect from the PNG file - then everything matches up again (because it’s once again all in the same colour space and the same profile). Additionally, even were CSS3 colour profiling supported and the HTML colours matched the profiled photo colours - the working space of the computer itself is highly unlikely to be calibrated, or correct. So the colours will STILL be wrong.

Do two wrongs make a right?

Not profiling is bad, in a professional sense. Profiling tries to ensure that the artist’s vision is maintained and what the viewer sees is exactly what the artist intended them to see. Not profiling is therefore like throwing your hands in the air and ‘just hoping it works out’. Well, not exactly. Two wrongs don’t make a right, and in a perfect world all computers would be colour managed, correctly profiled, and would guarantee everyone saw exactly the same colours. Unfortunately hardware will never ship that calibrates itself, software will never be set for correct colour profiling for the attached hardware (except by artists), and what someone else see’s will always be out of your control no matter whether there’s a profile in the image or not.

Another way to think of it is that the web already has a colour space (sRGB) and profile (null), which is also the profile and colour space of most operating systems and most hardware - so produce your work in sRGB if that’s where it will be displayed. Otherwise it’s like working in spot colours when you know you’ll be outputting to a desk-jet CMYK. Of course the colours shift - even if you convert the document to the desk-jet colour space after you’ve perfected it in ‘Spot Space’.

Why so complicated?

The real trouble isn’t browser support of colour space, but the fact that computers in general are not colour managed. Most users would be lucky if ‘black’ was black and ‘white’ was white. We can therefore assume that the colour space of the average computer user is plain old sRGB (unless you’re an artist and have calibrated the OS to your monitor - which, frankly, is the tiny minority of users. Those users may be ‘right’, but it’s a somewhat dubious vindication if the aim of the game is to show work to the public on their own machines - which will almost certainly not be colour managed, and will be in sRGB).

My point is that web workspace is already a known quantity - it is to all intents and purposes unmanaged sRGB. If people are outputting to web then Photoshop working space should be set up to work in sRGB to provide consistency, and images should be in an sRGB profile (though that’ll be stripped out on the web it’s the default colour space anyway, so it doesn’t make any difference).

Colour profiling in Safari will be a benefit only to those people who already have properly calibrated hardware. Otherwise all that happens is a colour shift that may or may not be closer to the artist’s original intent. And in the case of all existing browsers, the colour shift will mis-match the rest of the page.

Another way of thinking about it - music is created in a studio at full quality and sonic range. It then gets mastered on high-end audio equipment, and mixed into a 12bit CD format. But from then onward there’s no control of what equipment it’s played on. It might be played on a pair of Senheisser HD590’s (analogous to a calibrated browser - Safari in this case), but could be being run through a £20 CD player (analogous to your average Joe’s not-set-up-properly computer). Chances of it being played on a £2000 high end amp and CD player are slim (analogous to a profiled OS and monitor). Chances of it being played on that high-end system with the high end headphones are even more slim.

Comments

skip to comment form
  1. Matt Wilcox posted 1 days, 18hrs, 59mins after the entry and said:

    I've just read a succinct thought from someone else. If you don't embed an ICC profile into the image it behaves in the same way as normal.

    So no worries then - if you want the HTML colours to match the photo colours then don't embed a profile in the image. Otherwise if you prefer the photo to look truer to life include the profile.

    Sorted.

From the archives

Other enteries filed under:

Web Development

Site information

Built with valid XHTML and CSS, designed with web standards and accessibility in mind. Best viewed in a modern browser [Firefox, Safari, Opera]

This domain and all content is a copy of my old website, for historical purposes only.