CIELAB color space

Last updated
CIELAB color space top view CIELAB color space top view.png
CIELAB color space top view
CIELAB color space front view CIELAB color space front view.png
CIELAB color space front view
The CIE 1976 (L*, a*, b*) color space (CIELAB), showing only colors that fit within the sRGB gamut (and can therefore be displayed on a typical computer display). Each axis of each square ranges from -128 to 127. Lab color space.png
The CIE 1976 (L*, a*, b*) color space (CIELAB), showing only colors that fit within the sRGB gamut (and can therefore be displayed on a typical computer display). Each axis of each square ranges from −128 to 127.

The CIELAB color space, also referred to as L*a*b*, is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. [lower-alpha 1] It expresses color as three values: L* for perceptual lightness and a* and b* for the four unique colors of human vision: red, green, blue and yellow. CIELAB was intended as a perceptually uniform space, where a given numerical change corresponds to a similar perceived change in color. While the LAB space is not truly perceptually uniform, it nevertheless is useful in industry for detecting small differences in color.

Contents

Like the CIEXYZ space it derives from, CIELAB color space is a device-independent, "standard observer" model. The colors it defines are not relative to any particular device such as a computer monitor or a printer, but instead relate to the CIE standard observer which is an averaging of the results of color matching experiments under laboratory conditions.

Coordinates

The CIELAB space is three-dimensional and covers the entire gamut (range) of human color perception. It is based on the opponent model of human vision, where red and green form an opponent pair and blue and yellow form an opponent pair. The lightness value, L* (pronounced "L star"), defines black at 0 and white at 100. The a* axis is relative to the green–red opponent colors, with negative values toward green and positive values toward red. The b* axis represents the blue–yellow opponents, with negative numbers toward blue and positive toward yellow.

The a* and b* axes are unbounded and depending on the reference white they can easily exceed ±150 to cover the human gamut. Nevertheless, software implementations often clamp these values for practical reasons. For instance, if integer math is being used it is common to clamp a* and b* in the range of −128 to 127.

CIELAB is calculated relative to a reference white, for which the CIE recommends the use of CIE Standard illuminant D65. [1] D65 is used in the vast majority of industries and applications, with the notable exception being the printing industry which uses D50. The International Color Consortium largely supports the printing industry and uses D50 with either CIEXYZ or CIELAB in the Profile Connection Space, for v2 and v4 ICC profiles. [2]

While the intention behind CIELAB was to create a space that was more perceptually uniform than CIEXYZ using only a simple formula, [3] CIELAB is known to lack perceptual uniformity, particularly in the area of blue hues. [4]

The lightness value, L* in CIELAB is calculated using the cube root of the relative luminance with an offset near black. This results in an effective power curve with an exponent of approximately 0.43 which represents the human eye's response to light under daylight (photopic) conditions.

The sRGB gamut (left) and visible gamut under D65 illumination (right) plotted within the CIELAB color space. a and b are the horizontal axes; L is the vertical axis.

The three coordinates of CIELAB represent the lightness of the color (L* = 0 yields black and L* = 100 indicates white), its position between red and green (a*, where negative values indicate green and positive values indicate red) and its position between yellow and blue (b*, where negative values indicate blue and positive values indicate yellow). The asterisks (*) after L*, a*, and b* are pronounced star and are part of the full name to distinguish L*a*b* from Hunter's Lab, described below.

Since the L*a*b* model has three axes, it requires a three-dimensional space to be represented completely. [5] Also, because each axis is non-linear, it is not possible to create a two-dimensional chromaticity diagram. Additionally, the visual representations shown in the plots of the full CIELAB gamut on this page are an approximation, as it is impossible for a monitor to display the full gamut of LAB colors.

The green-red and blue-yellow opponent channels relate to the human vision system's opponent color process. This makes CIELAB a Hering opponent color space. The nature of the transformations also characterizes it as an chromatic value color space.

Perceptual differences

The nonlinear relations for L*, a* and b* are intended to mimic the nonlinear response of the visual system. Furthermore, uniform changes of components in the L*a*b* color space aim to correspond to uniform changes in perceived color, so the relative perceptual differences between any two colors in L*a*b* can be approximated by treating each color as a point in a three-dimensional space (with three components: L*, a*, b*) and taking the Euclidean distance between them. [6]

RGB and CMYK conversions

In order to convert RGB or CMYK values to or from L*a*b*, the RGB or CMYK data must be linearized relative to light. The reference illuminant of the RGB or CMYK data must be known, as well as the RGB primary coordinates or the CMYK printer's reference data in the form of a color lookup table (CLUT).

In color managed systems, ICC profiles contains these needed data, which are then used to perform the conversions.

Range of coordinates

As mentioned previously, the L* coordinate nominally ranges from 0 to 100. The range of a* and b* coordinates is technically unbounded, though it is commonly clamped to the range of −128 to 127 for use with integer code values, though this results in potentially clipping some colors depending on the size of the source color space. The gamut's large size and inefficient utilization of the coordinate space means the best practice is to use floating-point values for all three coordinates.

Advantages

Unlike the RGB and CMYK color models, CIELAB is designed to approximate human vision. The L* component closely matches human perception of lightness, though it does not take the Helmholtz–Kohlrausch effect into account. CIELAB is less uniform in the color axes, but is useful for predicting small differences in color.

The CIELAB coordinate space represents the entire gamut of human photopic (daylight) vision and far exceeds the gamut for sRGB or CMYK. In an integer implementation such as TIFF, ICC or Photoshop, the large coordinate space results in substantial data inefficiency due to unused code values. Only about 35% of the available coordinate code values are inside the CIELAB gamut with an integer format. [7]

Using CIELAB in an 8-bit per channel integer format typically results in significant quantization errors. Even 16-bit per channel can result in clipping, as the full gamut extends past the bounding coordinate space. Ideally, CIELAB should be used with floating-point data to minimize obvious quantization errors.

CIE standards and documents are copyright by the CIE and must be purchased; however, the formulas for CIELAB are available on the CIE website. [8]

Converting between CIELAB and CIEXYZ coordinates

From CIEXYZ to CIELAB

where t is or :

X, Y, and Z describe the color stimulus considered and Xn, Yn, Zn describe a specified white achromatic reference illuminant. for the CIE 1931 (2°) standard colorimetric observer and assuming normalization where the reference white has Y = 100, the values are:

For Standard Illuminant D65:

For illuminant D50, which is used in the printing industry:

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

The intercept f(0) = c was chosen so that L* would be 0 for Y = 0: c = 16/116 = 4/29. The above two equations can be solved for m and t0:

where δ = 6/29. [9]

[10]

From CIELAB to CIEXYZ

The reverse transformation is most easily expressed using the inverse of the function f above:

where

and where δ = 6/29.

Cylindrical model

The sRGB gamut (left) and visible gamut under D65 illumination (right) plotted within the CIELCHab color space. L is the vertical axis; C is the cylinder radius; h is the angle around the circumference.

The "CIELCh" or "CIEHLC" space is a color space based on CIELAB, which uses the polar coordinates C* (chroma, relative saturation) and h° (hue angle, angle of the hue in the CIELAB color wheel) instead of the Cartesian coordinates a* and b*. The CIELAB lightness L* remains unchanged.

The conversion of a* and b* to C* and h° is performed as follows:

Conversely, given the polar coordinates, conversion to Cartesian coordinates is achieved with:

The LCh (or HLC) color space is not the same as the HSV, HSL or HSB color models, although their values can also be interpreted as a base color, saturation and lightness of a color. The HSL values are a polar coordinate transformation of what is technically defined RGB cube color space. LCh is still perceptually uniform.

CIEHLC polar.png
CIELHLC 3D.png
L is the vertical axis; C is the cylinder radius; h is the angle around the circumference.

Further, H and h are not identical, because HSL space uses as primary colors the three additive primary colors red, green and blue (H = 0, 120, 240°). Instead, the LCh system uses the four colors red, yellow, green and blue (h = 0, 90, 180, 270°). Regardless the angle h, C = 0 means the achromatic colors (non saturated), that is, the gray axis.

The simplified spellings LCh, LCh(ab), LCH, LCH(ab) and HLC are common, but the letter presents a different order. HCL color space (Hue-Chroma-Luminance) on the other hand is a commonly used alternative name for the L*C*h(uv) color space, also known as the cylindrical representation or polar CIELUV . This name is commonly used by information visualization practitioners who want to present data without the bias implicit in using varying saturation. [11] [12] The name Lch(ab) is sometimes used to differentiate from L*C*h(uv).

A related color space, the CIE 1976 L*u*v* color space (a.k.a. CIELUV), preserves the same L* as L*a*b* but has a different representation of the chromaticity components. CIELAB and CIELUV can also be expressed in cylindrical form (CIELChab [13] and CIELChuv, respectively), with the chromaticity components replaced by correlates of chroma and hue.

Since the work on CIELAB and CIELUV, the CIE has been incorporating an increasing number of color appearance phenomena into their models and difference equations to better predict human color perception. These color appearance models, of which CIELAB is a simple example, [14] culminated with CIECAM02.

Oklab is built on the same spatial structure and achieves greater perceptual uniformity.

Usage

Some systems and software applications that support CIELAB include:

Hunter Lab

Hunter Lab (also known as Hunter L,a,b) is a color space defined in 1948 [24] [25] by Richard S. Hunter. It was designed to be computed via simple formulas from the CIEXYZ space, but to be more perceptually uniform. Hunter named his coordinates L, a and b.

Hunter Lab was a precursor to CIELAB, created in 1976 by the International Commission on Illumination (CIE), which named the coordinates for CIELAB as L*, a*, b* to distinguish them from Hunter's coordinates. [26] [27]

See also

Notes

  1. Referring to CIELAB as "Lab" without asterisks should be avoided to prevent confusion with Hunter Lab.

Related Research Articles

<span class="mw-page-title-main">Hue</span> Property of a color

In color theory, hue is one of the main properties of a color, defined technically in the CIECAM02 model as "the degree to which a stimulus can be described as similar to or different from stimuli that are described as red, orange, yellow, green, blue, violet," within certain theories of color vision.

<span class="mw-page-title-main">HSL and HSV</span> Alternative representations of the RGB color model

HSL and HSV are the two most common cylindrical-coordinate representations of points in an RGB color model. The two representations rearrange the geometry of RGB in an attempt to be more intuitive and perceptually relevant than the cartesian (cube) representation. Developed in the 1970s for computer graphics applications, HSL and HSV are used today in color pickers, in image editing software, and less commonly in image analysis and computer vision.

<span class="mw-page-title-main">Grayscale</span> Image where each pixels intensity is shown only achromatic values of black, gray, and white

In digital photography, computer-generated imagery, and colorimetry, a greyscale or grayscale image is one in which the value of each pixel is a single sample representing only an amount of light; that is, it carries only intensity information. Grayscale images, a kind of black-and-white or gray monochrome, are composed exclusively of shades of gray. The contrast ranges from black at the weakest intensity to white at the strongest.

<span class="mw-page-title-main">Colorfulness</span> Perceived intensity of a specific color

Colorfulness, chroma and saturation are attributes of perceived color relating to chromatic intensity. As defined formally by the International Commission on Illumination (CIE) they respectively describe three different aspects of chromatic intensity, but the terms are often used loosely and interchangeably in contexts where these aspects are not clearly distinguished. The precise meanings of the terms vary by what other functions they are dependent on.

sRGB Standard RGB color space

sRGB is a standard RGB color space that HP and Microsoft created cooperatively in 1996 to use on monitors, printers, and the World Wide Web. It was subsequently standardized by the International Electrotechnical Commission (IEC) as IEC 61966-2-1:1999. sRGB is the current defined standard colorspace for the web, and it is usually the assumed colorspace for images that are neither tagged for a colorspace nor have an embedded color profile.

<span class="mw-page-title-main">Adobe RGB color space</span> Color space developed by Adobe

The Adobe RGB (1998) color space or opRGB is a color space developed by Adobe Inc. in 1998. It was designed to encompass most of the colors achievable on CMYK color printers, but by using RGB primary colors on a device such as a computer display. The Adobe RGB (1998) color space encompasses roughly 30% of the visible colors specified by the CIELAB color space – improving upon the gamut of the sRGB color space, primarily in cyan-green hues. It was subsequently standardized by the IEC as IEC 61966-2-5:1999 with a name opRGB and is used in HDMI.

In color science, a color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components. When this model is associated with a precise description of how the components are to be interpreted, taking account of visual perception, the resulting set of colors is called "color space."

<span class="mw-page-title-main">ProPhoto RGB color space</span> Photographic color space developed by Kodak

The ProPhoto RGB color space, also known as ROMM RGB, is an output referred RGB color space developed by Kodak. It offers an especially large gamut designed for use with photographic output in mind. The ProPhoto RGB color space encompasses over 90% of possible surface colors in the CIE L*a*b* color space, and 100% of likely occurring real-world surface colors documented by Michael Pointer in 1980, making ProPhoto even larger than the Wide-gamut RGB color space. The ProPhoto RGB primaries were also chosen in order to minimize hue rotations associated with non-linear tone scale operations. One of the downsides to this color space is that approximately 13% of the representable colors are imaginary colors that do not exist and are not visible colors.

<span class="mw-page-title-main">CIE 1931 color space</span> Color space defined by the CIE in 1931

In 1931 the International Commission on Illumination (CIE) published the CIE 1931 color spaces which define the relationship between the visible spectrum and the visual sensation of specific colors by human color vision. The CIE color spaces are mathematical models that create a "standard observer", which attempts to predict the perception of unique hues of color. These color spaces are essential tools that provide the foundation for measuring color for industry, including inks, dyes, and paints, illumination, color imaging, etc. The CIE color spaces contributed to the development of color television, the creation of instruments for maintaining consistent color in manufacturing processes, and other methods of color management.

Adams chromatic valence color spaces are a class of color spaces suggested by Elliot Quincy Adams. Two important Adams chromatic valence spaces are CIELUV and Hunter Lab.

<span class="mw-page-title-main">Lightness</span> Property of a color

Lightness is a visual perception of the luminance of an object. It is often judged relative to a similarly lit object. In colorimetry and color appearance models, lightness is a prediction of how an illuminated color will appear to a standard observer. While luminance is a linear measurement of light, lightness is a linear prediction of the human perception of that light.

In colorimetry, the CIE 1976L*, u*, v*color space, commonly known by its abbreviation CIELUV, is a color space adopted by the International Commission on Illumination (CIE) in 1976, as a simple-to-compute transformation of the 1931 CIE XYZ color space, but which attempted perceptual uniformity. It is extensively used for applications such as computer graphics which deal with colored lights. Although additive mixtures of different colored lights will fall on a line in CIELUV's uniform chromaticity diagram, such additive mixtures will not, contrary to popular belief, fall along a line in the CIELUV color space unless the mixtures are constant in lightness.

<span class="mw-page-title-main">CIECAM02</span> Color appearance model

In colorimetry, CIECAM02 is the color appearance model published in 2002 by the International Commission on Illumination (CIE) Technical Committee 8-01 and the successor of CIECAM97s.

In color science, color difference or color distance is the separation between two colors. This metric allows quantified examination of a notion that formerly could only be described with adjectives. Quantification of these properties is of great importance to those whose work is color-critical. Common definitions make use of the Euclidean distance in a device-independent color space.

<span class="mw-page-title-main">Color space</span> Standard that defines a specific range of colors

A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of color – whether such representation entails an analog or a digital representation. A color space may be arbitrary, i.e. with physically realized colors assigned to a set of physical color swatches with corresponding assigned color names, or structured with mathematical rigor. A "color space" is a useful conceptual tool for understanding the color capabilities of a particular device or digital file. When trying to reproduce color on another device, color spaces can show whether shadow/highlight detail and color saturation can be retained, and by how much either will be compromised.

A color appearance model (CAM) is a mathematical model that seeks to describe the perceptual aspects of human color vision, i.e. viewing conditions under which the appearance of a color does not tally with the corresponding physical measurement of the stimulus source.

<span class="mw-page-title-main">HCL color space</span> Color space model

HCL (Hue-Chroma-Luminance) or LCh refers to any of the many cylindrical color space models that are designed to accord with human perception of color with the three parameters. Lch has been adopted by information visualization practitioners to present data without the bias implicit in using varying saturation. They are, in general, designed to have characteristics of both cylindrical translations of the RGB color space, such as HSL and HSV, and the L*a*b* color space. Some conflicting definitions of the terms are:

Hunter Lab is a color space defined in 1948 by Richard S. Hunter. It was designed to be computed via simple formulas from the CIEXYZ space, but to be more perceptually uniform. Hunter named his coordinates L, a and b. Hunter Lab was a precursor to CIELAB, created in 1976 by the International Commission on Illumination (CIE), which named the coordinates for CIELAB as L*, a*, b* to distinguish them from Hunter's coordinates.

<span class="mw-page-title-main">Oklab color space</span> Standard color space with color-opponent values

The Oklab color space is a uniform color space for device independent color designed to improve perceptual uniformity, hue and lightness prediction, color blending, and usability while ensuring numerical stability and ease of implementation. Introduced by Björn Ottosson in December 2020, Oklab and its cylindrical counterpart, Oklch, have been included in the CSS Color Level 4 and Level 5 drafts for device-independent web colors since December 2021. They are supported by recent versions of major web browsers and allow the specification of wide-gamut P3 colors.

References

  1. CIE Colorimetry 15 (Third ed.). CIE. 2004. ISBN   3-901-906-33-9.
  2. 1 2 International Color Consortium, Specification ICC.1:2004-10 (Profile version 4.2.0.0) Image technology color management — Architecture, profile format and data structure, (2006).
  3. MacEvoy, Bruce. "Explanation of this history".
  4. A discussion and proposed improvement, Bruce Lindbloom
  5. 3D representations of the L*a*b* gamut, Bruce Lindbloom.
  6. Jain, Anil K. (1989). Fundamentals of Digital Image Processing . New Jersey, United States of America: Prentice Hall. pp.  68, 71, 73. ISBN   0-13-336165-9.
  7. "LAB Integer Gamut —Bruce Lindbloom". brucelindbloom.com. Retrieved 2020-12-12.
  8. "CIELAB Formula". CIE Terms List. Retrieved 2024-05-10.
  9. János Schanda (2007). Colorimetry. Wiley-Interscience. p. 61. ISBN   978-0-470-04904-4.
  10. "CIE 1976 L*a*b* colour space | eilv". eilv.cie.co.at. Archived from the original on 2019-12-28. Retrieved 2020-12-12.
  11. Zeileis, Achim; Hornik, Kurt; Murrell, Paul (2009). "Escaping RGBland: Selecting Colors for Statistical Graphics" (PDF). Computational Statistics & Data Analysis. 53 (9): 3259–3270. doi:10.1016/j.csda.2008.11.033.
  12. Stauffer, Reto; Mayr, Georg J.; Dabernig, Markus; Zeileis, Achim (2015). "Somewhere over the Rainbow: How to Make Effective Use of Colors in Meteorological Visualizations" (PDF). Bulletin of the American Meteorological Society. 96 (2): 203–216. Bibcode:2015BAMS...96..203S. doi:10.1175/BAMS-D-13-00155.1. hdl: 10419/101098 .
  13. CIE-L*C*h Color Scale
  14. Fairchild, Mark D. (2005). "Color and Image Appearance Models". Color Appearance Models. John Wiley and Sons. p. 340. ISBN   0-470-01216-1.
  15. Margulis, Dan (2006). Photoshop Lab Color: The Canyon Conundrum and Other Adventures in the Most Powerful Colorspace. Berkeley, Calif. : London: Peachpit; Pearson Education. ISBN   0-321-35678-0.
  16. The Lab Color Mode in Photoshop, Adobe TechNote 310838
  17. TIFF: Revision 6.0 Archived 2000-08-15 at the Wayback Machine Adobe Developers Association, 1992
  18. Color Consistency and Adobe Creative Suite Archived 2008-07-25 at the Wayback Machine
  19. Adobe Acrobat Reader 4.0 User Guide "The color model Acrobat Reader uses is called CIELAB…"
  20. "Lab Adjustments - RawPedia". rawpedia.rawtherapee.com. Retrieved 2018-05-08.
  21. "2.6. More use for CIE LAB and CIE LCH". docs.gimp.org.
  22. "Color Module Level 4". w3.org. Retrieved 2023-10-06.
  23. "lab() - CSS: Cascading Style Sheets MDN". developer.mozilla.org. Retrieved 2023-10-06.
  24. Hunter, Richard Sewall (July 1948). "Photoelectric Color-Difference Meter". JOSA . 38 (7): 661. (Proceedings of the Winter Meeting of the Optical Society of America)
  25. Hunter, Richard Sewall (December 1948). "Accuracy, Precision and Stability of New Photo-electric Color-Difference Meter". JOSA . 38 (12): 1094. (Proceedings of the Thirty-Third Annual Meeting of the Optical Society of America)
  26. Hunter, Richard Sewall (July 1948). "Photoelectric Color-Difference Meter". JOSA . 38 (7): 661. (Proceedings of the Winter Meeting of the Optical Society of America)
  27. Hunter, Richard Sewall (December 1948). "Accuracy, Precision, and Stability of New Photo-electric Color-Difference Meter". JOSA . 38 (12): 1094. (Proceedings of the Thirty-Third Annual Meeting of the Optical Society of America)