The RGB Code: The Mysteries of Color Revealed
Part 3: Color Differences and Converting Colors
By Danny Pascale
In the last installment our heroes had found the secrets of the RGB code, and now they wanted to spread the truth. Others may have chosen to use their new found knowledge to rule the world (graphic world, that is), but they wanted to share it. Their first idea was to publish a book, The Secrets of the RGB Code, to be published by their own newly-formed publishing house. For marketing purposes, they wanted a large printout of the book cover, designed with a carefully-selected shade of pinkish blue for its background, a task they could not perform on their small home printer.One of the most common tasks when dealing with color is to determine how far you are from the desired color. This could be the color seen on your monitor relative to what it should be, based on the RGB space of the image you look at, or how close a printed color is relative to a color you have as a reference (RGB, L*a*b*, etc.). Another problem you may have is to determine the equivalent color in two different RGB spaces, such as sRGB and Adobe (1998).
Often these tasks can be handled by simple spreadsheet formulas or performed through color management functions within your graphics editing programs. But you may need specific answers for a critical color, a company logo for example, and you may not want to bother with spreadsheets. This is the time when you need to delve deeper in your understanding of color (not the mathematics themselves, which can rapidly become quite complex).
Let's look into these tasks.
Color differences are expressed as DeltaE, a value based on the Euclidian distance (the shortest line in three dimensions) between the coordinates of the reference and sample (Note: the word "Delta" is often shown as its Greek symbol, a small triangle). For the L*a*b* space this difference is called DeltaE*ab.
In all of these, the goal is that a color difference of 1 corresponds to a barely noticeable difference by 50% of the persons comparing the two patches. That is, the difference formula should work equally well for whitish-blue colors, saturated reds and dark brown shades, a very difficult task indeed. CIE94 is often considered a "better" choice for small color differences than DeltaE*ab, which is a "good" all around choice, especially for large color differences. Be aware that CIE94 values for small color differences are about half the numbers obtained with DeltaE*ab, so specifying which color difference formula to use for comparison is important (when looking at the specs of a colorimeter, for example). While a color difference of 1 may often create a debate, a color difference of 5 will be noticed a lot more rapidly by more people. The 1 to 5 range is a good place to start. More critical graphic design applications may go toward the low values, whereas applications in which it is difficult to compare the color with a reference could well go over 5.
To place the conversion errors in perspective, the conditions in which these images will be seen have to be taken into consideration. One of these conditions is the observation time. According to a review article by Has & al. (see Ref. 1), an inexperienced user will take approximately 5 seconds to notice a DeltaE*ab difference of 15 from an original. The time goes up to 10 seconds for a DeltaE*ab of 10 and 15 seconds for a DeltaE*ab of 5. Note that we are talking about complex images, not single patches being compared side by side.
Another study (see Ref. 2) has shown that errors of less than 2.5 DeltaE*ab are not visible on real-world images shown on a CRT monitor. As for printed material, errors between 2 and 4 DeltaE*ab are mentioned by Has & al. as typical of the accuracy we can get from the offset and rotogravure processes.
On the hardware side, it has been shown (see Ref. 3) that CRTs require a warm-up time varying between 15 minutes and three hours, depending on models, before achieving a long term stability of 0.15 DeltaE*ab on average. On a given CRT subjected to a large luminance variation, an initial DeltaE*ab of 1.0 was seen to exponentially decrease to about 0.1 DeltaE*ab in 60 seconds. The practical implication here is that when a monitor is shut down by an automatic power saving feature, it will not be as accurate in the following minutes after it starts again.
If the previous paragraphs appear nebulous let's go back to our heroes, who are now looking at their enlarged book cover as it returned from the printer, and see how they compare a sRGB color with the measured result obtained from an "unreliable" printing center.
They had sRGB (143, 144, 211) as the background color for their book. They felt the pinkish blue (lilac), gave just the right impression to the book content. They went to their local copy shop, which they knew had a large-format inkjet printer. The returned print looked so bad that the copy shop did not even charge for it but claimed that the Photoshop file supplied by our heroes was at fault and suggested the use of a Quark or Illustrator file, instead (based on true story!). The shop had provided nice prints with the same file format in the past, but they may have fallen on a different operator, on a bad day, who knows. Or was it yet another plot to prevent them from publishing their book?Let's have a look at their data and compare it using a color conversion tool. In the following image, the left side corresponds to the required color. The RGB coordinates are shown as well as the corresponding L*a*b* and L*C*h* values. On the right side is shown the measured L*a*b* value, used as input, as well as the corresponding L*C*h* and sRGB values.
As mentioned in Part 2 of this series, and shown again in the first illustration of this article, L*C*h* is derived from L*a*b* but it replaces the a* and b* chroma coordinates by a single Chroma vector and the angle that this vector has relative to the origin. C* and h* are more closely associated with how we perceive color than a* and b*. That being said, DeltaE* based on L*a*b* is identical to DeltaE* based on L*C*h*.
By looking at these Deltas, you should be able to see that the printed color presents a very big color shift (Deltah* = -27.7 degrees), is much more saturated (DeltaC* = +9.59) and is a bit darker (DeltaL* = -4.49). If you take the hue angle of the reference color (h* = 288 degrees) and look at where this angle falls on the L*a*b* diagram shown at the start of this section, you see that this is a well-defined reddish blue, whereas the angle of the measured color (h* = 260 degrees) is a greenish blue. Overall, it's a mess!
If you base your color difference judgment on the RGB values alone, the only thing you can say at first glance is that the measured color lacks red. It is less obvious that there is more saturation although this can be deduced by comparing all three RGB numbers; however, quantifying that saturation is near to impossible using RGB numbers.
Once again, numbers brought them knowledge. Cracking the RGB code was just the first step, not the final answer.
The point of these examples is to show that using a color difference value as a method of controlling the accuracy and quality of your prints can give you some benefits. You are better able to judge your supplier's performance and find corrective measures if there is a problem, especially if they are willing to cooperate. The second example also shows that very acceptable results can be obtained at home, when proper means are used. (And some money; the cost of the instruments used to calibrate printers can be of the same order, for colorimeters, or way more expensive, for spectrophotometers, than what you pay for decent home printers.)
In the two illustrations of the examples, L*a*b* and L*C*h* are shown in Illuminant D50 even though the sRGB space is defined in Illuminant D65. By the way, this is how Photoshop displays L*a*b* data, always in D50, irrelevant of the working space Illuminant. The L*a*b* values for D65 are different and you should not compare L*a*b* numbers determined from different Illuminants; if you are stuck with such data, you have to convert one set or the other. This is the subject of the next section.
Pleasantly surprised by the results obtained by the Master, especially with their old equipment which they thought obsolete, our heroes decided to purchase a colorimeter and calibrate their monitor themselves. They now had another tool in their arsenal to help them in their frequent encounters with the RGB codes.One of the problems of this conversion is that the sRGB space is defined for Illuminant D65 and ProPhoto is defined for Illuminant D50. This job would be somewhat facilitated if they had the spectral data of the sRGB color. Using the spectral data, you need only to recalculate the XYZ coordinates using the spectral emission curve of D50 and the method presented in ASTM E308 (the reference is given in Part 1); then, from XYZ, go to RGB (linear) and R'G'B' (gamma corrected). As we mentioned before, this approach is not recommended for those unfamiliar with the mathematics of colorimetry. But this solution does not even apply here, since our duo do not have the spectral data, only sRGB values.
The solution is to use an approximate method, called a Chromatic Adaptation Transform, which applies a matrix transform directly to XYZ coordinates to change the Illuminant from D65 to D50. Such a matrix has to be derived for each pair of Illuminants; the matrix between D65 and D50 is not the same as the one between C to D50, etc. There again, some mathematical knowledge is required but tools are designed to handle this task easily. The conversion process goes as follows:
In many graphic editing programs, similar transforms happen constantly behind the monitor screen, based on ICC profiles. Such is the case when your input file, in Adobe (1998), is translated to your calibrated sRGB monitor, for display purposes only, or when the same file is converted into yet another color space defined by your printer's inks, most likely not an RGB space. These translations can be done with different "intents" and you may see such terms as "Perceptual", "Saturation", "Relative Colorimetric", "Absolute Colorimetric" with still further options such as "Black Point Compensation". These intents and options all affect the final outcome, a subject which has been covered by many color management specialists (Masters!).
By constantly gathering information, reading and experimenting, our heroes managed to learn the many facets of the RGB code. At their suggestion, the local print shop hired their new Master friend as a consultant; they now obtain accurate and consistent colors from this supplier. What seemed like a plot against them was just a lack of knowledge.Conclusion
This concludes this quest about finding the secrets of the RGB code. However, once you start looking into the myriad details and options that colorimetry offers you, you may realize that it is only the beginning.
(2): M. Stokes, M.D. Fairchild, R. S. Berns, Colorimetric Quantified Visual Tolerances for Pictorial Images, Comparison of Color Images Presented in Different Media, Proc. Vol. 2, 757-777 (1992), M. Pearson ed., Tech. Assoc. Graphic Arts and Inter-Soc. Color Council.
(3): R. S. Berns, M. E. Gorzynski, R. J. Motta, CRT Colorimetry, Part II: Metrology, COLOR research and application 18 (5), 315-325 (1993).
Danny Pascale: After many years of research and development, and project management work in the academic and industrial sectors, he now does technology assessment and helps companies bring new products to the market (a consultant, if you prefer!) in the computer and consumer electronics industries. He recently formed a new company, BabelColor, dedicated to the development of colorimetric software tools.