'''Lab''' is the abbreviated name of two different [[color spaces]]. The best known is '''CIELAB''' (strictly '''CIE 1976 L*a*b*''') and the other is '''Hunter Lab''' (strictly, '''Hunter L, a, b'''). ''Lab'' is an informal abbreviation, and without further checking should not be assumed to be one or the other. The color spaces are related in intention and purpose, but are different.
Both spaces are derived from the "master" space [[CIE 1931 color space|CIE 1931 XYZ color space]]. However, CIELAB is calculated using cube roots, and Hunter Lab is calculated using square roots.[[http://www.hunterlab.com/appnotes/an02_01.pdf Hunter L,a,b Versus CIE 1976 L*a*b*] (PDF)] Except where data must be compared with existing Hunter L,a,b values, it is recommended that CIELAB be used for new applications.[
The intention of both spaces is to produce a color space that is more perceptually linear than other color spaces. ''Perceptually linear'' means that a change of the same amount in a color value should produce a change of about the same visual importance. When storing colors in limited precision values, this can improve the reproduction of tones. Both are also [[absolute color space|absolute color spaces]], so they define colors exactly, unlike (for example) RGB or CMYK which do not exactly define color, only a mixing recipe for light or ink (respectively).
==Which Lab?==
Some specific uses of the abbreviation in software, literature etc.
* In [[Adobe Photoshop]], image editing using "Lab" is CIELAB.
* In [[ICC Profiles]], the Lab color space used as a profile connection space is CIELAB.
* In [[TIFF]] files, the Lab color space is CIELAB.
* In [[PDF]] documents, the Lab color space is CIELAB.
{| align="right" style="margin-left: 1em"|
|[[image:Lab color at luminance 25%.png|thumb|Lightness 25%]]
|-
|[[image:Lab color at neutral luminance.png|thumb|Lightness 50%]]
|-
|[[image:Lab color at luminance 75%.png|thumb|Lightness 75%]]
|}
== CIE 1976 L*, a*, b* Color Space (CIELAB) ==
'''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 its ''CIE'' [[initialism]]). ''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''. CIELAB is an [[Adams Chromatic Value]] Space.
The three parameters in the model represent the lightness of the color ('''L*''', L*=0 yields black and L*=100 indicates white), its position between magenta and green ('''a*''', negative values indicate green while positive values indicate magenta) and its position between yellow and blue ('''b*''', negative values indicate blue and positive values indicate yellow).
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.
CIE 1976 L*a*b* is based directly on the [[CIE 1931 color space|CIE 1931 XYZ color space]] as an attempt to linearize the perceptibility of color differences, using the color difference metric described by the [[MacAdam ellipse]]. 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.
=== RGB and CMYK conversions ===
Programmers and others often seek a formula for conversion between [[RGB color model|RGB]] or [[CMYK color model|CMYK]] values and L*a*b*, not understanding that RGB and CMYK are not absolute color spaces and so have no precise relation to an [[absolute color space]] such as L*a*b*. To convert between RGB and L*a*b*, for example, it is necessary to determine or assume an absolute color space for the RGB data, such as [[sRGB color space|sRGB]] or [[Adobe RGB color space|Adobe RGB]]. For each of these absolute spaces, there are standard techniques for converting to and from the XYZ absolute color space (see for example [[SRGB color space#Specification of the transformation]]) which can be combined with the above transformations to convert them to L*a*b*.
=== XYZ to CIE L*a*b* (CIELAB) and CIELAB to XYZ conversions ===
====The forward transformation====
:$L^*\; =\; 116\backslash ,f(Y/Y\_n)\; -\; 16$
:$a^*\; =\; 500\backslash ,[f(X/X\_n)\; -\; f(Y/Y\_n)]$
:$b^*\; =\; 200\backslash ,[f(Y/Y\_n)\; -\; f(Z/Z\_n)]$
where
:$f(t)\; =\; t^\{1/3\}\backslash ,$ for $t\; >\; 0.008856\backslash ,$
:$f(t)\; =\; 7.787\backslash ,t\; +\; 16/116$ otherwise
Here $X\_n$, $Y\_n$ and $Z\_n$ 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=t]_{0}, and was assumed to match the t^{1/3} part of the function at t_{0} in both value and slope. In other words:
:{|
|-
|$t\_0^\{1/3\}\backslash ,$
|$=\backslash ,$
|$a\; t\_0\; +\; b\backslash ,$
| (match in value)
|-
|$1/(3t\_0^\{2/3\})\backslash ,$
|$=\backslash ,$
|$a\backslash ,$
| (match in slope)
|}
The value of b was chosen to be 16/116. The above two equations can be solved for a and t_{0}:
:{|
|-
|$a\backslash ,$
|$=\backslash ,$
|$1/(3\backslash delta^2)\backslash ,$
|$=\; 7.787037\backslash cdots$
|-
|$t\_0\backslash ,$
|$=\backslash ,$
|$\backslash delta^3\backslash ,$
|$=\; 0.008856\backslash cdots$
|}
where $\backslash delta=6/29$. Note that $16/116=2\backslash delta/3$
==== The reverse transformation====
The reverse transformation is as follows (with $\backslash delta=6/29$ as mentioned above):
# define $f\_y\backslash equiv\; (L^*+16)/116$
# define $f\_x\backslash equiv\; f\_y+a^*/500$
# define $f\_z\backslash equiv\; f\_y-b^*/200$
# if $f\_y\; >\; \backslash delta\backslash ,$ then $Y=Y\_nf\_y^3\backslash ,$ else $Y=(f\_y-16/116)3\backslash delta^2Y\_n\backslash ,$
# if $f\_x\; >\; \backslash delta\backslash ,$ then $X=X\_nf\_x^3\backslash ,$ else $X=(f\_x-16/116)3\backslash delta^2X\_n\backslash ,$
# if $f\_z\; >\; \backslash delta\backslash ,$ then $Z=Z\_nf\_z^3\backslash ,$ else $Z=(f\_z-16/116)3\backslash delta^2Z\_n\backslash ,$
=== 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:
:$L^*\; =\; 116\; (Y/Y\_n)^\{1/3\}\; -\; 16\backslash ,$
:$u^*\; =\; 13L^*\; (\; u\text{'}\; -\; u\_n\text{'}\; )\backslash ,$
:$v^*\; =\; 13L^*\; (\; v\text{'}\; -\; v\_n\text{'}\; )\backslash ,$
The quantities $u\_n\text{'}$ and $v\_n\text{'}$ refer to the reference [[white point]] or the light source. (For example, for the 2° observer and illuminant C, $u\_n\text{'}\; =\; 0.2009$, $v\_n\text{'}\; =\; 0.4610$.) Equations for u' and v' are given below:
:$u\text{'}\; =\; 4X\; /\; (X\; +\; 15Y\; +\; 3Z)\; =\; 4x\; /\; (\; -2x\; +\; 12y\; +\; 3\; )\backslash ,$
:$v\text{'}\; =\; 9Y\; /\; (X\; +\; 15Y\; +\; 3Z)\; =\; 9y\; /\; (\; -2x\; +\; 12y\; +\; 3\; )\backslash ,$.
====The reverse transformation====
The transformation from (u',v') to (x,y) is:
:$x\; =\; 27u\text{'}\; /\; (\; 18u\text{'}\; -\; 48v\text{'}\; +\; 36\; )\backslash ,$
:$y\; =\; 12v\text{'}\; /\; (\; 18u\text{'}\; -\; 48v\text{'}\; +\; 36\; )\backslash ,$.
The transformation from CIELUV to XYZ is performed as following:
:$u\text{'}\; =\; u^*\; /\; (\; 13L^*)\; +\; u\_n\backslash ,$
:$v\text{'}\; =\; v^*\; /\; (\; 13L^*\; )\; +\; v\_n\backslash ,$
:$Y\; =\; Y\_n((\; L^*\; +\; 16\; )\; /\; 116\; )^3\backslash ,$
:$X\; =\; -\; 9Yu\text{'}\; /\; ((\; u\text{'}\; -\; 4\; )\; v\text{'}\; -\; u\text{'}v\text{'}\; )\backslash ,$
:$Z\; =\; (\; 9Y\; -\; 15v\text{'}Y\; -\; v\text{'}X\; )\; /\; 3v\text{'}\backslash ,$
== Hunter Lab Color Space ==
'''L''' is a correlate of [[Lightness]], and is computed from the Y [[tristimulus]] value using Priest's Approximation to [[Munsell]] Value:
$L=100\backslash sqrt\{Y/Yn\}$
where Yn is the Y [[tristimulus]] value of a specified white object. For surface-color applications, the specified white object is usually (though not always) a hypothetical material with unit reflectance and which follows [[Lambert's law.]]. The result will be Ls scaled between 0 (black) and 100 (white); roughly 10 times [[Munsell]] value. Note, however, that a mid-range Lightness of 50 is produced not by a Y of 50, but rather of 25.
'''a''' and '''b''' are termed [[opponent color]] axes. a represents, roughly, Redness (positive) versus Greenness (negative), and is computed:
$a=K\_a\backslash left(\backslash frac\{X/X\_n-Y/Y\_n\}\{\backslash sqrt\{Y/Y\_n\}\}\backslash right)$
where $K\_a$ is a coefficient which depends upon the illuminant (for D65, Ka is 172.30; see approximate formula below) and Xn is the X [[tristimulus]] value of the specified white object.
The other opponent color axis, '''b''', is positive for yellow colors and negative for blue colors. It is computed as:
$b=K\_b\backslash left(\backslash frac\{Y/Yn-Z/Zn\}\{\backslash sqrt\{Y/Yn\}\}\backslash right)$
where $K\_b$ is a coefficient which depends upon the illuminant (for D65, $K\_b$ is 67.20; see approximate formula below) and Zn is the Z [[tristimulus]] value of the specified white object.[Hunter Labs (1996). "Hunter Lab Color Scale". ''Insight on Color'' '''8''' 9 (August 1-15, 1996). Reston, VA, USA: Hunter Associates Laboratories.]
Both a and b will be zero for objects which have the same [[Chromaticity diagram|chromaticity]] coordinates as the specified white objects. Usually this is the case for neutrals.
=== Approximate Formulas for Ka and Kb ===
In the previous version of the Hunter Lab color space, $K\_a$ was 175 and $K\_b$ was 70. Apparently, Hunter Associates Lab discovered that better agreement could be obtained with other color difference metrics, such as CIELAB (see below) by allowing these coefficients to depend upon the illuminants. Approximate formulae are:
$K\_a\backslash approx\backslash frac\{175\}\{198.04\}(X\_n+Y\_n)$
$K\_b\backslash approx\backslash frac\{70\}\{218.11\}(Y\_n+Z\_n)$
which result in the original values for Illuminant C, the original illuminant with which the Lab color space was used.
=== The Hunter Lab Color Space as an [[Adams Chromatic Valance]] Space ===
[[Adams Chromatic Valance]] spaces are based on two elements: a (relatively) uniform lightness scale, and a (relatively) uniform [[chromaticity diagram]].[Adams, E. Q. (1942). "X-Z planes in the 1931 I.C.I. system of colorimetry". ''JOSA'' '''32''' 3: 168-173.] If we take as the uniform lightness scale Priest's approximation to the [[Munsell]] Value scale, which would be written in modern notation:
$L=100\backslash sqrt\{Y/Yn\}$
and, as the uniform chromaticity coordinates:
$c\_a=\backslash frac\{X/Xn\}\{Y/Yn\}-1=\backslash frac\{X/Xn-Y/Yn\}\{Y/Yn\}$
$c\_b=k\_e\backslash left(1-\backslash frac\{Z/Zn\}\{Y/Yn\}\backslash right)=k\_e\backslash frac\{Y/Yn-Z/Zn\}\{Y/Yn\}$
where $k\_e$ is a tuning coefficient, we obtain the two chromatic axes:
$a=K\backslash cdot\; L\backslash cdot\; c\_a=K\backslash cdot\; 100\backslash sqrt\{Y/Yn\}\backslash frac\{X/Xn-Y/Yn\}\{Y/Yn\}=K\backslash cdot\; 100\backslash frac\{X/Xn-Y/Yn\}\{\backslash sqrt\{Y/Yn\}\}$
and
$b=K\backslash cdot\; L\backslash cdot\; c\_b=K\backslash cdot\; k\_e\backslash cdot\; 100\backslash sqrt\{Y/Yn\}\backslash frac\{Y/Yn-Z/Zn\}\{Y/Yn\}=K\backslash cdot\; k\_e\backslash cdot\; 100\backslash frac\{Y/Yn-Z/Zn\}\{\backslash sqrt\{Y/Yn\}\}$
which is identical to the Hunter Lab formulae given above if we select $K=K\_a/100$ and $k\_e=K\_b/K\_a$. Therefore, the Hunter Lab color space is an [[Adams Chromatic Valance]] space.
== References ==
==See also==
*[[Color space]]:
**[[RGB color space]]s
**[[CMYK color model]] for color [[printing]]
**[[HSV color space]]
**[[HSL color space]]
**[[RYB color model]] the traditional color model used by artists.
**[[YUV]] for [[PAL]] [[television]]
**[[YDbDr]] for [[SECAM]] [[television]]
**[[YIQ]] for [[NTSC]] [[television]]
[[Category:Color space]]
[[Category:Color]]
[[de:Lab-Farbraum]]
[[fr:CIE Lab]]
[[nl:CIELAB]]
[[pl:CIELAB]]