# How is CIELAB color computed?

The way that CIELAB is usually computed is with some reference illuminant, e.g. A, D65, or D75. These illuminants are normalized to a value of 100 at 560nm. When doing a relative color measurement, the result is usually referenced to these illuminants:

- Reflective/transmissive: the reflection or transmission spectrum (0-100% at each wavelength) is multiplied by this illuminant before the individual color values (X, Y, Z) are computed. Thus, the resulting X, Y, and Z values (which are the starting point for other color spaces such as CIELAB) are all relative to this normalized reference illuminant. That is, at no point can the reflection spectrum exceed the intensity (which shows up as the L* value in CIELAB) of the reference illuminant. The XYZ->CIELAB conversion (taken from CIE 15.2 1986, “Colorimetry”) bounds L* to the range of 0-100 as follows:
- Given Y as the raw color measurement for the y-bar stimulus, and Yn as the corresponding raw color measurement for the reference illuminant, for large values of (Y/Yn), L* is computed as (116 * (Y/Yn)^0.33) – 16. The maximum reflectivity is assumed to be 100%, meaning that Y = Yn for all wavelengths. In this case, the formula for L* evaluates to (116 * (1)^0.33) – 16 = 100.
- For small values of Y/Yn, the formula for L* changes to L* = 903.3 * (Y/Yn). Assuming that 0% reflection is the minimum, this means that the smallest possible L* value is 903.3 * (0) = 0.

- Emissive (relative irradiance): when we do color measurements from relative irradiance, the relative irradiance spectrum is also normalized (typically 100 at the peak wavelength for the ideal blackbody that is being referenced, at least this is how SpectraSuite does it). When this spectrum is compared against a theoretical illuminant (e.g. D75) for the color measurement calculation, as described above for reflection, the magnitudes of the two spectra are comparable because both of them have been normalized to 100 at some wavelength. The calculations for L* are the same, but instead of multiplying a reflection spectrum against a reference illuminant to get the emissive spectrum, the relative irradiance spectrum is used directly. This will keep L* in approximately the same range of 0-100, though it could potentially go slightly higher than 100 in some cases (i.e. if the sample was brighter than the reference at the wavelengths that contribute to the Y value).

That is, for reflection, transmission, and relative irradiance, it can be expected that the Y values will be approximately in the range 0-100, which translates to an L* value in that same range when computing CIELAB.

Absolute irradiance, however, is completely different.

In absolute irradiance, the spectrum is not normalized. That’s kind of the point — in the modes described above, the spectrum is always relative to something: a reference illuminant, a lamp that is assumed to be a blackbody source, etc., and by being normalized they are bounded to some convenient limit (like 100). Absolute irradiance is not normalized to anything: the magnitude is computed in absolute terms against standard physical constants. The spectrum that results from an absolute irradiance calculation describes the light source being measured, and the magnitude is bounded only by the possible intensity of that light source and the limits of the instrument. If you were to accurately measure the surface of a supernova with absolute irradiance, the total power (the spectral magnitude) would literally be astronomical. There is no bound of 100 anywhere. In other words, “100 for the brightest white” is all relative unless you mean “the brightest white that is possible in the entire universe”.

The fundamental problem is that the L* value in CIELAB is not an appropriate measure of absolute brightness. It might be useful for a reflective, transmissive, or possibly even relative irradiance measure of brightness, since all of these are relative. For absolute brightness, there is a whole other set of photometry measurements, including lumens, lux, candela, and luminance. These have no upper bound and are expressed (as absolute irradiance is) in standard physical units.

The reason that L* is being computed as being quite small is because the total amount of power (uWatts/cm^2/nm) being measured from the user’s monitor is quite small. Monitors do not produce much photonic power, which is what absolute irradiance is measuring.

If you were to do a relative irradiance measurement instead, using a white area of the screen as the reference, you might find that their L* value is in better agreement with what you expect. This would be true only because you would be making a measurement relative to something else; in this case, “the brightest white” that the display can generate, which becomes the definition of L* = 100 for the duration of that measurement.

If you wanted to see whether the absolute irradiance calibration was credible, you could try to measure daylight and compare that to the average solar irradiance for their part of the world. The average “insolation” (solar irradiance) reaching the surface is about 250 W/m^2, but this varies with latitude, time of day, and season. You may be able to look at the integrated power being measured across the absolute irradiance spectrum and see how it compares (though some unit conversion may be required).

Any time that a comparison is done between computer color spaces (typically RGB) and colorimetry based on models of human perception (typically XYZ, which leads to things like CIELAB) there is significant risk of error. RGB is usually nicely bounded to 0-255 for each of its values. Conversion matrices have been created (with implicit and usually unstated reference illuminants and observers) to try to map from computer color spaces to human-model color spaces. These conversions are imperfect, and there are many cases where converting from one color space to another this way results in invalid color values. In particular, the human-model color spaces cover a much larger range of colors and intensities than RGB can represent. Any time that a computer tries to convert between its own RGB colors into a human-model color space (such as CIELAB), one must be suspicious of the result. For instance, the “Digital Color Meter” application provided with some desktop computers is not necessarily authoritative on color measurement. It might be okay for relative color measurements (if the reference and dark spectra are taken as the brightest and dimmest the monitor can render — note too that “black” on a monitor will often still allow some of the backlight through), but it is not meaningful to use it for, or in comparison to, an absolute measurement of intensity.

The CIELAB color measurement done in SpectraSuite is done as indicated in CIE 15.2 (1986), page 30, and CIE 15.3 (2004) pages 17-18. The CIE is the premiere organization for color and photometry measurement.