What About Gamma?

by Philip Greenspun for the Web Tools Review

What is Gamma?

If you treat colors as numbers from 0 to 1 (from black to white), gamma conversion is a mapping from one set of colors to another with the following equation:
color' = color ^ gamma
Note that the original color is "raised to the power of gamma". Blacks and whites aren't changed at all. Only colors in the middle are adjusted. A gamma of 1.0 does nothing. A gamma of 10.0 would move all the medium tones to almost black, while again leaving absolute black and white the same.

Why have gamma at all? It allegedly adjusts for nonlinearities in the relationship between the voltage sent to a monitor and its light output. The relationship is typically a power law (y = x**P, where P is around 2.2 or so).

Check out the CGSD gamma document and Robert Berger's explanation for more background.

Why is it important?

Every one of your users will have a setup with a different gamma. An image that looks just right on a PC will very likely come out a bit washed out on a Macintosh and too dark on a Sun.

What can I as a publisher do?

Send email to Netscape and the Web Consortium telling them that you need a gamma tag built into HTML. If you could just say
<IMG SRC="foo.jpg" GAMMA=1.0>

or

<IMG SRC="foo.jpg" GAMMA=2.2>

then a browser on a machine with a system gamma of 2.2 would know to correct the first image but leave the second alone.

Other than that, you can't do much except cry.

What Gamma should I produce for?

Probably the best compromise is to produce your images so that they look right on a Macintosh with the gamma set to 2.2 (the default is 1.8). Make sure that you've set up PhotoShop or whatever other image editing tool you're using to target for this gamma as well.

Your images will be a bit light on the average Mac but not absurdly dark on Unix boxes.

If you don't know how to set your system gamma, check out my little tutorial in photo.net.


Return to Web Tools Review home


philg@mit.edu

Related Links

Add a comment | Add a link