rpenner
26th July 2006 - 01:59 AM
Oops, I found some errors I made in my haste. I told you how to make "Tristimulus Values" X, Y and Z, not CIELAB. The CIELAB is a transformed version of the X, Y, and Z relative to a "White Point" -- XYZ are about photons going into your eye and what color you see. Colored lights are best discussed in XYZ. CIELAB is about photons hitting a color surface and then your eye. CIE LAB is best for colors of paint, fabrics and
fruit.
The variables are (L* (0-100), a* (-500..+500), and b* (-200..+200))
http://www.cie.co.at/cie/ (The CIE)
http://www.math.ucla.edu/~jimc/xcolor/color.txt (Some untrustworthy information)
http://www.cie.co.at/publ/abst/15-2004.html (A URL where you can get Standard Observer Data from the CIE -- in France, the comma is used as the decimal point)
Step 1, choose your CIE Standard Observer (1931, or 1964) depending on the viewing conditions you which to match colors for.
QUOTE
The delineation of the three color-matching response functions of the human observer is called the 1931 CIE Standard Observer (also known as the 2° Observer). This international standard can also be shown as a table of weighting factors from which a specification of color by CIE X, Y, Z tristimulus values can be derived. The 2° Observer is intended to be used when viewing smaller samples (typical of printed materials) that create an angle of view at the eye between about 1° and less than about 4°.
Using the 10° Observer (1964) is recommended whenever the pairs of specimens being viewed create an angle subtended at the eye greater than about 4°.
Step 2, get your CIE standard observer data tabulated at regular intervals
Step 3, get your data at regular intervals
Step 4, get reference data for "white" from a source. You usually can't fake this well, but if you are doing software simulation, the second CIE link above also points to "Standard Illuminants" or in the worse case, just find the bigest number in your data and say "white" is a sample that gives that value at all wavelengths.
Step 5, multiply and sum both your data (getting X, Y, and Z) and your white data (geting X_n, Y_n, and Z_n) with one of the standard observers.
Step 6, compute CIE L*a*b* from the correct formula at
http://en.wikipedia.org/wiki/Lab_color_space