Color management in Firefox

I’ve bought ColorHug to make color profiles for my monitors. ColorHug is a great device for the price and it works without problems on GNU/Linux. Using it together with dispcalGUI I could easily create the color profiles.

Making a color profile is one thing while applying it is another problem. My experience with color management (and image processing generally) on GNU/Linux is that there are many bugs in the graphics tools and libraries and things can easily get wrong at any place. It is necessary to check everything for correctness.

Here is what I had to do to get the monitor profile correctly applied in Firefox. First, the profile must be installed as a system profile for the given display. This can be done e.g. using dispwin -I from Argyll. Note that setting the monitor profile in Firefox preferences instead didn’t work for me.

This is everything what had to be done for Firefox till version 16. There is a change in Firefox 17 fixing application of some color profiles while completely breaking application of the profiles created with dispcalGUI — it looks like they are applied in reverse. After many experiments I’ve found that the following combination works correctly: Create LUT-based (not matrix-based) profile in dispcalGUI and enable ICCv4 in Firefox. The latter can be done by entering about:config and setting the option gfx.color_management.enablev4 to true. Only under those conditions I could get proper image colors in Firefox.

Unfortunately even that doesn’t work flawlessly. There’s another bug in Firefox that corrupts displaying some PNG images under those settings. But this is a relatively minor problem.