# Lab color space

 Luminance 25% Luminance 50% Luminance 75%

CIE L*a*b* (CIELAB) is the most complete color model used conventionally to describe all the colors visible to the human eye. It was developed for this specific purpose by the International Commission on Illumination (Commission Internationale d'Eclairage, hence the CIE acronym in its name). The * after L, a and b are part of the full name, since they represent L*, a* and b*, derived from L, a and b.

The three parameters in the model represent the luminance of the color (L, the smallest L yields black), its position between red and green (a, the smallest a yields green) and its position between yellow and blue (b, the smallest b yields blue).

The Lab color model has been created to serve as a device independent, absolute model to be used as a reference. Therefore it is crucial to realize that the visual representations of the full gamut of colors in this model are never accurate. They are there just to help in understanding the concept, but they are inherently inaccurate.

Since the Lab model is a three dimensional model, it can only be represented properly in a three dimensional space. A useful feature of the model however is that the first parameter is extremely intuitive: changing its value is like changing the brightness setting in a TV set. Therefore only a few representations of some horizontal "slices" in the model are enough to conceptually visualize the whole gamut, assuming that the luminance would be represented on the vertical axis.

An important thing to remember about the Lab model is the fact that it's inherently parametrized correctly, therefore no specific color spaces based on this model are needed.

CIE 1976 L*a*b* is based directly on CIE XYZ as an attempt to linearize the perceptibility of color differences. The non-linear relations for L*, a*, and b* are intended to mimic the logarithmic response of the eye. Coloring information is referred to the color of the white point of the system, subscript n.

 Contents

## XYZ to CIE L*a*b* (CIELAB) and CIELAB to XYZ conversions

### The forward transformation

[itex]L^* = 116\,f(Y/Y_n) - 16[itex]
[itex]a^* = 500\,[f(X/X_n) - f(Y/Y_n)][itex]
[itex]b^* = 200\,[f(Y/Y_n) - f(Z/Z_n)][itex]

where

[itex]f(t) = t^{1/3}\,[itex] for [itex] t > 0.008856\,[itex]
[itex]f(t) = 7.787\,t + 16/116[itex] otherwise

Here [itex]X_n[itex], [itex]Y_n[itex] and [itex]Z_n[itex] are the CIE XYZ tristimulus values of the reference white point.

The division of the f(t) function into two domains was done to prevent an infinite slope at t=0. f(t) was assumed to be linear below some t=t0, and was assumed to match the t1/3 part of the function at t0 in both value and slope. In other words:

 [itex]t_0^{1/3}\,[itex] [itex]=\,[itex] [itex]a t_0 + b\,[itex] (match in value) [itex]1/(3t_0^{2/3})\,[itex] [itex]=\,[itex] [itex]a\,[itex] (match in slope)

The value of b was chosen to be 16/116. The above two equations can be solved for a and t0:

 [itex]a\,[itex] [itex]=\,[itex] [itex]1/(3\delta^2)\,[itex] [itex]= 7.787037\cdots[itex] [itex]t_0\,[itex] [itex]=\,[itex] [itex]\delta^3\,[itex] [itex]= 0.008856\cdots[itex]

where [itex]\delta=6/29[itex]. Note that [itex]16/116=2\delta/3[itex]

### The reverse transformation

The reverse transformation is as follows (with [itex]\delta=6/29[itex] as mentioned above):

1. define [itex]f_y\equiv (L^*+16)/116[itex]
2. define [itex]f_x\equiv f_y+a^*/500[itex]
3. define [itex]f_z\equiv f_y-b^*/200[itex]
4. if [itex]f_y > \delta\,[itex] then [itex]Y=Y_nf_y^3\,[itex]   else [itex]Y=(f_y-16/116)3\delta^2Y_n\,[itex]
5. if [itex]f_x > \delta\,[itex] then [itex]X=X_nf_x^3\,[itex]   else [itex]X=(f_x-16/116)3\delta^2X_n\,[itex]
6. if [itex]f_z > \delta\,[itex] then [itex]Z=Z_nf_z^3\,[itex]   else [itex]Z=(f_z-16/116)3\delta^2Z_n\,[itex]

## XYZ to CIELUV & CIELUV to XYZ conversions

### The forward transformation

CIE 1976 L*u*v* (CIELUV) is based directly on CIE XYZ and is another attempt to linearize the perceptibility of color differences. The non-linear relations for L*, u*, and v* are given below:

[itex]L^* = 116 (Y/Y_n)^{1/3} - 16\,[itex]
[itex]u^* = 13L^* ( u' - u_n' )\,[itex]
[itex]v^* = 13L^* ( v' - v_n' )\,[itex]

The quantities [itex]u_n'[itex] and [itex]v_n'[itex] refer to the reference white point or the light source. (For example, for the 2° observer and illuminant C, [itex]u_n' = 0.2009[itex], [itex]v_n' = 0.4610[itex].) Equations for u' and v' are given below:

[itex]u' = 4X / (X + 15Y + 3Z) = 4x / ( -2x + 12y + 3 )\,[itex]
[itex]v' = 9Y / (X + 15Y + 3Z) = 9y / ( -2x + 12y + 3 )\,[itex].

### The reverse transformation

The transformation from (u',v') to (x,y) is:

[itex]x = 27u' / ( 18u' - 48v' + 36 )\,[itex]
[itex]y = 12v' / ( 18u' - 48v' + 36 )\,[itex].

The transformation from CIELUV to XYZ is performed as following:

[itex]u' = u / ( 13L^*) + u_n\,[itex]
[itex]v' = v / ( 13L^* ) + v_n\,[itex]
[itex]Y = (( L^* + 16 ) / 116 )^3\,[itex]
[itex]X = - 9Yu' / (( u' - 4 ) v' - u'v' )\,[itex]
[itex]Z = ( 9Y - 15v'Y - v'X ) / 3v'\,[itex]de:Lab-Farbraum

• Art and Cultures
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Space and Astronomy