Color management in the GIMP
With the recent GIMP 2.3.3 release, color management in the GIMP is now well past what we have had before. Recently, someone asked me what color management is, in simple terms, so I wrote the following. There might be some error in here, unfortunately I don’t always have the time to research what I write. Corrections welcome.
Color is one of the most subjective things around – what are “red”, “green”, and “blue” quantitavely? Every input device has a slightly different perception of color – try scanning a photo with 2 different scanners, or taking a photo of the same scene with 2 different cameras. The results will be almost, but not quite, the same.
There are similar problems for output – two screens will show the same data with slightly different colors, and the same image printed to 2 different printers may be different.
Usually, the differences are small enough that we don’t really care (although if you do the test, you might be surprised at how big the difference is). But for print work and graphics design, color is everything. We want to start from a photograph, have colors from the photo appear exactly the same on the screen, and then after airbrushing away those freckles and printing the photo, we want the colors to look the same as the original.
Company logos and art-work are chosen with their colors by meticulous people who couldn’t tolerate a slightly different shade of pink being in the logo than the one they chose – imagine a graphics designer ripping his hair out while passing a billboard add saying “No, no, they ruined my work.” because the charcoal grey he had chosen was slightly darker than the printed result.
So to address all these issues, an international standards body was established, to decide what color is. In fact, there are two groups – the first, the CIE (Commission Internationale de l’Eclairage) defined the standard for colorspaces, and the ICC (International Color Consortium) defined a standard way to convert between these standard colorspaces and device-specific colorspaces. The CIE colorspaces are XYZ for linear additive color (plates in a printer, or diodes on a screen, for example) and La*b* for “perceptive” color – which doesn’t quite work the same way. So a value in one of these colorspaces is the same, everywhere.
They also defined a means of converting from these standards to other colorspaces. Our typical RGB colorspace represents the way light waves combine to create color. CMYK, for cyan, magenta, yellow, blacK, is the way that paints mix to generate colors (since paints absorb rather than reflect colors, this is called a subtractive colorspace – as you know if you’ve ever painted, when you add more & more paint to a mix, the color gets darker & darker, until every addition just gives a murky brown).
The means to changing between colorspaces is a color profile (also called an ICC profile). These can be embedded in images to say what colorspace was used to capture the data, to allow it to be converted to XYZ, and from there to another colorspace.
High-end scanners and digital cameras embed these profiles in the images that come from them. Screens and printers have profiles associated with them too. So we can load an image, and by applying the embedded profile, in combination with the display’s profile, the projection on the screen should be exactly the same as what we started with. And by combining with the printer’s profile during printing, the result on paper will look the same too.
This functionality has long been missing from the GIMP, but now we have it. Admittedly, it is of limited usefulness while we are limited to 8 bits per channel, because the application of a color profile results in what is called banding – when you squeeze one colorspace into another, sometimes colors close together map to the same color in the output, which means that we lose some quality. However, this is a massive step forward over what we have had until now.
August 12th, 2005 at 9:45 am
Not to nitpic or anything, but the K in CMYK is for Key, not blacK.
August 13th, 2005 at 7:44 am
It may be useful to add some information on L*a*b (also known as CIE Lab). This color model is, just like most other models, 3-dimensional with axes L, a and b.
L is a scale from white to black, much like the Value in the HSV (Hue, Saturation, Value) model
A ranges from green (-a) to red (+a)
B ranges from blue (-b) to yellow (+b)
The advantages of using L*a*b for color coding are basically device-independence and the fact that brightness has its own axis (the L axis), so that you don’t have to deduce it from the other real color-related values (as is the case in RGB, for example).
All colors in RGB can be displayed as a color diagram called the gamut. Since this gamut represents all possible colors (only the ones CIE Lab, actually, but the range is really big enough for human beings), other more limited colorspaces like RGB and CMYK can be represented as a part of the gamut space. RGB, for instance, forms a triangular shape in which red, green and blue form the corners, while CMYK is a much more circular form which allows for more shades of colors other than red, green and blue.
August 13th, 2005 at 7:46 am
Oops. Bad typo. The sentence “All colors in RGB can be displayed as a color diagram called the gamut.” should have read:
All colors in CIE Lab can be displayed as a color diagram called the gamut.
August 14th, 2005 at 7:32 pm
acutally, the K in cmyk is indeed for Black.. K is a standard method of differentiating between “blue” and “black”.
and hurrah for colourspace finally working in the gimp; now if only it had dynamic size layers! 🙂