Hubbry Logo
LMS color spaceLMS color spaceMain
Open search
LMS color space
Community hub
LMS color space
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
LMS color space
LMS color space
from Wikipedia

Normalized responsivity spectra of human cone cells, S, M, and L types (SMJ data based on Stiles and Burch[1] RGB color-matching, linear scale, weighted for equal energy)[2]

LMS (long, medium, short), is a color space which represents the response of the three types of cones of the human eye, named for their responsivity (sensitivity) peaks at long, medium, and short wavelengths.

The numerical range is generally not specified, except that the lower end is generally bounded by zero. It is common to use the LMS color space when performing chromatic adaptation (estimating the appearance of a sample under a different illuminant). It is also useful in the study of color blindness, when one or more cone types are defective.

Definition

[edit]

The cone response functions are the color matching functions (CMFs) for the LMS color space. The chromaticity coordinates (L, M, S) for a spectral distribution are defined as:

The cone response functions are normalized to have their maxima equal to unity.

XYZ to LMS

[edit]

Typically, colors to be adapted chromatically will be specified in a color space other than LMS (e.g. sRGB). The chromatic adaptation matrix in the diagonal von Kries transform method, however, operates on tristimulus values in the LMS color space. Since colors in most colorspaces can be transformed to the XYZ color space, only one additional transformation matrix is required for any color space to be adapted chromatically: to transform colors from the XYZ color space to the LMS color space.[3]

In addition, many color adaption methods, or color appearance models (CAMs), run a von Kries-style diagonal matrix transform in a slightly modified, LMS-like, space instead. They may refer to it simply as LMS, as RGB, or as ργβ. The following text uses the "RGB" naming, but do note that the resulting space has nothing to do with the additive color model called RGB.[3]

The chromatic adaptation transform (CAT) matrices for some CAMs in terms of CIEXYZ coordinates are presented here. The matrices, in conjunction with the XYZ data defined for the standard observer, implicitly define a "cone" response for each cell type.

Notes:

Hunt, RLAB

[edit]

The Hunt and RLAB color appearance models use the Hunt–Pointer–Estevez transformation matrix (MHPE) for conversion from CIE XYZ to LMS.[4][5][6] This is the transformation matrix which was originally used in conjunction with the von Kries transform method, and is therefore also called von Kries transformation matrix (MvonKries).

  • Equal-energy illuminants:
  • Normalized[7] to D65:

Bradford's spectrally sharpened matrix (LLAB, CIECAM97s)

[edit]

The original CIECAM97s color appearance model uses the Bradford transformation matrix (MBFD) (as does the LLAB color appearance model).[3] This is a “spectrally sharpened” transformation matrix (i.e. the L and M cone response curves are narrower and more distinct from each other). The Bradford transformation matrix was supposed to work in conjunction with a modified von Kries transform method which introduced a small non-linearity in the S (blue) channel. However, outside of CIECAM97s and LLAB this is often neglected and the Bradford transformation matrix is used in conjunction with the linear von Kries transform method, explicitly so in ICC profiles.[8]

A "spectrally sharpened" matrix is believed to improve chromatic adaptation especially for blue colors, but does not work as a real cone-describing LMS space for later human vision processing. Although the outputs are called "LMS" in the original LLAB incarnation, CIECAM97s uses a different "RGB" name to highlight that this space does not really reflect cone cells; hence the different names here.

LLAB proceeds by taking the post-adaptation XYZ values and performing a CIELAB-like treatment to get the visual correlates. On the other hand, CIECAM97s takes the post-adaptation XYZ value back into the Hunt LMS space, and works from there to model the vision system's calculation of color properties.

Later CIECAMs

[edit]

A revised version of CIECAM97s switches back to a linear transform method and introduces a corresponding transformation matrix (MCAT97s):[9]

The sharpened transformation matrix in CIECAM02 (MCAT02) is:[10][3]

CAM16 uses a different matrix:[11]

As in CIECAM97s, after adaptation, the colors are converted to the traditional Hunt–Pointer–Estévez LMS for final prediction of visual results.

Stockman & Sharpe (2000) physiological CMFs

[edit]

From a physiological point of view, the LMS color space describes a more fundamental level of human visual response, so it makes more sense to define the physiopsychological XYZ by LMS, rather than the other way around.

A set of physiologically-based LMS functions were proposed by Stockman & Sharpe in 2000. The functions have been published in a technical report by the CIE in 2006 (CIE 170).[12][13] The functions are derived from Stiles and Burch[1] RGB CMF data, combined with newer measurements about the contribution of each cone in the RGB functions. To adjust from the 10° data to 2°, assumptions about photopigment density difference and data about the absorption of light by pigment in the lens and the macula lutea are used.[14]

XYZ color matching functions, CIE 1931 and Stockman & Sharpe 2006.

The Stockman & Sharpe functions can then be turned into a set of three color-matching functions similar to the CIE 1931 functions.[15]

Let be the three cone response functions, and let be the new XYZ color matching functions. Then, by definition, the new XYZ color matching functions are:

where the transformation matrix is defined as:

The derivation of this transformation is relatively straightforward.[16] The CMF is the luminous efficiency function originally proposed by Sharpe et al. (2005),[17] but then corrected (Sharpe et al., 2011[18][a]). The CMF is equal to the cone fundamental originally proposed by Stockman, Sharpe & Fach (1999)[19] scaled to have an integral equal to the CMF. The definition of the CMF is derived from the following constraints:
  1. Like the other CMFs, the values of are all positive.
  2. The integral of is identical to the integrals for and .
  3. The coefficients of the transformation that yields are optimized to minimize the Euclidean differences between the resulting , and color matching functions and the CIE 1931 , and color matching functions.
    — CVRL description for 'CIE (2012) 2-deg XYZ "physiologically-relevant" colour matching functions'[15]

For any spectral distribution , let be the LMS chromaticity coordinates for , and let be the corresponding new XYZ chromaticity coordinates. Then:

or, explicitly:

The inverse matrix is shown here for comparison with the ones for traditional XYZ:

The above development has the advantage of basing the new XFYFZF color matching functions on the physiologically-based LMS cone response functions. In addition, it offers a one-to-one relationship between the LMS chromaticity coordinates and the new XFYFZF chromaticity coordinates, which was not the case for the CIE 1931 color matching functions. The transformation for a particular color between LMS and the CIE 1931 XYZ space is not unique. It rather depends highly on the particular form of the spectral distribution ) producing the given color. There is no fixed 3x3 matrix which will transform between the CIE 1931 XYZ coordinates and the LMS coordinates, even for a particular color, much less the entire gamut of colors. Any such transformation will be an approximation at best, generally requiring certain assumptions about the spectral distributions producing the color. For example, if the spectral distributions are constrained to be the result of mixing three monochromatic sources, (as was done in the measurement of the CIE 1931 and the Stiles and Burch[1] color matching functions), then there will be a one-to-one relationship between the LMS and CIE 1931 XYZ coordinates of a particular color.

As of Nov 28, 2023, CIE 170-2 CMFs are proposals that have yet to be ratified by the full TC 1-36 committee or by the CIE.

Quantal CMF

[edit]

For theoretical purposes, it is often convenient to characterize radiation in terms of photons rather than energy. The energy E of a photon is given by the Planck relation

where E is the energy per photon, h is the Planck constant, c is the speed of light, ν is the frequency of the radiation and λ is the wavelength. A spectral radiative quantity in terms of energy, JE(λ), is converted to its quantal form JQ(λ) by dividing by the energy per photon:

For example, if JE(λ) is spectral radiance with the unit W/m2/sr/m, then the quantal equivalent JQ(λ) characterizes that radiation with the unit photons/s/m2/sr/m.

If CEλi(λ) (i=1,2,3) are the three energy-based color matching functions for a particular color space (LMS color space for the purposes of this article), then the tristimulus values may be expressed in terms of the quantal radiative quantity by:

Define the quantal color matching functions:

where λi max is the wavelength at which CEλ i(λ)/λ is maximized. Define the quantal tristimulus values:

Note that, as with the energy based functions, the peak value of CQλi(λ) will be equal to unity. Using the above equation for the energy tristimulus values CEi

For the LMS color space, ≈ {566, 541, 441} nm and

J/photon

Applications

[edit]

Color blindness

[edit]

The LMS color space can be used to emulate the way color-blind people see color. An early emulation of dichromats were produced by Brettel et al. 1997 and was rated favorably by actual patients. An example of a state-of-the-art method is Machado et al. 2009.[20]

A related application is making color filters for color-blind people to more easily notice differences in color, a process known as daltonization.[21]

Image processing

[edit]

JPEG XL uses an XYB color space derived from LMS. Its transform matrix is shown here:

This can be interpreted as a hybrid color theory where L and M are opponents but S is handled in a trichromatic way, justified by the lower spatial density of S cones. In practical terms, this allows for using less data for storing blue signals without losing much perceived quality.[22]

The colorspace originates from Guetzli's butteraugli metric[23] and was passed down to JPEG XL via Google's Pik project. Matt DesLauriers has produced a Gist with the relevant parts from the reference implementation of JPEG XL translated into JavaScript.[24]

See also

[edit]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The LMS color space is a tristimulus that represents colors in terms of the relative excitations of the three types of photoreceptors in the : long-wavelength-sensitive (L) cones peaking around 564 nm, medium-wavelength-sensitive (M) cones peaking around 534 nm, and short-wavelength-sensitive (S) cones peaking around 420 nm. This space is grounded in the physiological basis of trichromatic , where responses provide a more biologically accurate representation of spectral stimuli compared to device-dependent models like RGB or perceptually uniform spaces like CIELAB. Unlike the CIE 1931 XYZ color space, which is based on hypothetical primaries derived from color-matching experiments, LMS directly approximates fundamentals—spectral sensitivity functions of the —derived from psychophysical data and adjusted for factors such as macular density and lens pigmentation. Key formulations include the 2-degree and 10-degree fundamentals developed by Andrew Stockman and Lars T. Sharpe in 2000, which build on earlier estimates like those of Smith and Pokorny (1975) and incorporate data from Stiles and Burch (1959) color-matching functions. These fundamentals enable linear between LMS and other spaces, such as via 3×3 matrices (e.g., LMS = M × XYZ, where M is a calibrated to physiological data). LMS color space finds extensive applications in vision science, including modeling color appearance, simulating color vision deficiencies, and calibrating displays for accurate color reproduction. It is particularly valuable in computational for tasks like rendering and physiological simulations, as it aligns closely with processing before post-receptoral adaptations. The CIE has endorsed physiologically relevant LMS functions based on Stockman and Sharpe's work as part of its 2006 standard, facilitating standardized use in international color metrics.

Physiological Foundations

Cone Sensitivity Functions

The human retina contains three types of cone photoreceptors, classified by their peak spectral sensitivities: long-wavelength-sensitive (L) cones, peaking at approximately 564 nm in the yellow-green region; medium-wavelength-sensitive (M) cones, peaking at approximately 534 nm in the green region; and short-wavelength-sensitive (S) cones, peaking at approximately 420 nm in the blue-violet region. These peaks represent the wavelengths at which each cone type exhibits maximum responsiveness to monochromatic light, with significant overlap in their sensitivity curves enabling trichromatic color vision. Early estimations of cone sensitivities date back to the , with P. J. Bouma providing one of the first quantitative approximations based on assumptions about color mixture and loss in dichromatic vision. Subsequent refinements incorporated psychophysical data, notably from W. S. Stiles and J. M. Burch's 1959 experiments, which measured color-matching functions for 49 observers using 10-degree fields and primaries at 444 nm, 526 nm, and 645 nm. These data allowed derivation of spectral sensitivity curves, or cone fundamentals, by transforming the observed matches into estimates of individual responses while accounting for ocular media absorption. Cone fundamentals are represented as spectral sensitivity functions—l(λ) for L-cones, m(λ) for M-cones, and s(λ) for S-cones—derived from such psychophysical experiments to approximate the quantal catch of each cone type. These curves describe the relative efficiency of light at wavelength λ in stimulating each cone, typically smoothed and extrapolated from experimental thresholds and matches. Normalization of these functions commonly sets their maxima to unity for comparability across models, ensuring that the peak sensitivity at the respective λ_max equals 1. The response of an L-cone to a spectral power distribution J(λ) is then given by: L=λJ(λ)l(λ)dλL = \int_{\lambda} J(\lambda) \, l(\lambda) \, d\lambda with analogous integrals for M and S responses using m(λ) and s(λ). This linear integration models the quantal absorption under the assumption of equal photon efficacy, though actual responses incorporate post-receptoral factors in full vision models.

Relation to Human Color Vision

The LMS color space directly models the neural responses generated by the three classes of cone photoreceptors in the retina, forming the foundation of trichromatic color vision theory. In this framework, light stimuli are transduced into electrical signals by specialized photopigments—opsins—within long-wavelength-sensitive (L or ), medium-wavelength-sensitive (M or ), and short-wavelength-sensitive (S or ) cones, enabling the discrimination of spectral variations across the visible range. These cone responses capture the initial stage of color encoding, where the relative activation levels of L, M, and S cones determine the perceived hue, saturation, and brightness of a visual scene. Beyond initial transduction, LMS signals undergo opponent processing in the post-receptoral visual pathway, transforming them into chromatic opponent channels that align with perceptual color categories. Specifically, the L-M difference encodes red-green opponency, while S-(L+M) supports blue-yellow opponency, complemented by a channel derived from L+M for achromatic . This opponent organization, first physiologically demonstrated through single-unit recordings in the (LGN), reveals neurons tuned to these contrasts, indicating that color information is recoded early in the pathway to enhance efficiency in representing hue differences. Chromatic adaptation in the LMS domain further illustrates its tie to human vision by facilitating , the ability to perceive stable object colors across illuminant changes. Under the von Kries model, adaptation occurs via independent scaling of , and S cone sensitivities to normalize responses relative to the ambient light, preserving relative color differences despite absolute shifts in spectral power. Electrophysiological studies of ganglion cells and LGN neurons provide evidence for this mechanism at post-receptoral stages, where opponent signals adjust dynamically to illuminant variations, supporting perceptual invariance in natural viewing conditions.

Mathematical Transformations

From CIE XYZ to LMS

The CIE XYZ color space serves as a device-independent representation of colors, derived from the tristimulus values of the CIE 1931 standard colorimetric observer, which itself originates from linear combinations of RGB primaries matched to human color matching functions. To convert these XYZ tristimulus values to LMS cone responses, which approximate the excitations of the long-wavelength (L), medium-wavelength (M), and short-wavelength (S) sensitive cones in the human retina, a linear transformation is applied. This transformation is expressed as a : (LMS)=M(XYZ),\begin{pmatrix} L \\ M \\ S \end{pmatrix} = \mathbf{M} \begin{pmatrix} X \\ Y \\ Z \end{pmatrix},
Add your contribution
Related Hubs
User Avatar
No comments yet.