Getting Correct Color on the Web: Firefox 8 and v4 ICC Profiles

Mozilla caused great rejoicing around the world when they introduced Firefox 3 with full color management. Then they $%#@ed everything up by breaking it in Firefox 3.5 and – I’m not making this up – not fixing it until version 8.0! You see, version 3 could read both version 2 and version 4 ICC profiles but Firefox 3.5 through 7 could only read version 2 profiles. It’s taken several years and 4-1/2 browser versions for them to get their act together.

So what does this mean for us and how do we implement it?

Because every display device (LCD monitors, in this case) displays colors slightly differently, a lot of imaging professionals embed ICC profiles in their photographs to tell software how best to render its display. (This post on monitor profiling explains the basics of ICC profiles and color management.) This only works properly if the software you’re using recognizes and implements embedded ICC profiles. All professional image editing software like Photoshop does. Most web browsers don’t. Firefox and Safari are the only web browsers that are fully color managed, that is to say they read ICC profiles and render images appropriately. The catch is that Firefox before version 8 could only read version 2 ICC profiles… and even version 8 defaults to ignoring v4 profiles. But you can fix this. Here’s how:

Type 'about:config' in browser address barStep 1:
In the Address Bar of Firefox, type the words “about:config” and then press the Enter key. (If this is the first time you’ve done this Firefox will pop up a bizarre warning about "voiding your warranty" – just click OK and proceed.) This brings up the built-in customization page where you can configure myriad options in Firefox. To reach any one of them you can either scroll through the entire list or, if you know what you’re looking for, start typing it into the Filter box above the list.

Type 'gfx.color' in filter barStep 2:
Type the words "gfx.color" into the Filter Bar and you’ll get something like the image at right. The two parameters you’ll need to change are:

  • "gfx.color_management.enablev4"
  • "gfx.color_management.mode"

Step 3:
"gfx.color_management.enablev4" will most likely show a value of "false". If this is the case, simply double click the word "false" (or anywhere on that line of text) to change it to "true".

Enter '1' in mode dialog boxStep 4:
Next, double-click on "gfx.color_management.mode" to bring up the dialog box shown at right. Enter "1" as shown and click OK.

That’s all there is to it. Firefox (after shut-down and re-start) will now render embedded color profiles correctly. To test it, visit this web page:

So What Do the Settings Do?

The first setting, "gfx.color_management.enablev4", just tells Firefox it should read both kinds of ICC profiles rather than just version 2 profiles. Why anyone would want their browsers to read only v2 profiles is "a mystery best left unsolved", I think. Why Firefox should default to having this set at "false" is even more baffling. No matter; we’ve fixed it now.

The second setting controls how Firefox treats "tagged" images (images with an embedded ICC profile) versus untagged images. Most images on the web are untagged: Only serious imaging professionals really have the need to have their images rendered with really high color accuracy and since the embedded profile adds several kilobytes to an image’s file size it makes no sense to tag small images and decorative web graphics.

Here’s how the "gfx.color_management.mode" settings operate:

Mode = 0
Color Management Off. Firefox will just pass image color numbers raw and uncorrected.

Mode = 1
Enable color management for all images. This will have the following effects on tagged and untagged images:

  • Tagged images will be interpreted correctly as per their embedded ICC profile.
  • Untagged images will be assumed to be in sRGB color space (usually a safe assumption) and interpreted as if that ICC profile were embedded.

Mode = 2
Enable color management for tagged images only. This will have the following effects on tagged and untagged images:

  • Tagged images will be interpreted correctly as per their embedded ICC profile.
  • Untagged images will be passed through Firefox with color values unaltered.
This entry was posted in Color Management, Photography, The Web. Bookmark the permalink.


Click here to enable the Facebook 'Like' button

Comments are closed.