right|frame|Normalized responsivity spectra of human cone cells, S, M, and L types ( data based on Stiles and Burch RGB color-matching, linear scale, weighted for equal energy)

LMS (long, medium, short), is a color space which represents the response of the three types of cone cells 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

The cone response functions <math>\bar{l}(\lambda), \bar{m}(\lambda),\bar{s}(\lambda)</math> are the color matching functions (CMFs) for the LMS color space. The chromaticity coordinates (L, M, S) for a spectral distribution <math>J(\lambda)</math> are defined as:

: <math>L = \int^\infty_0 J(\lambda)\bar{l}(\lambda)d\lambda</math>

: <math>M = \int^\infty_0 J(\lambda)\bar{m}(\lambda)d\lambda</math>

: <math>S = \int^\infty_0 J(\lambda)\bar{s}(\lambda)d\lambda</math>

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

XYZ to LMS

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.

  • Unless specified otherwise, the CAT matrices are normalized (the elements in a row add up to 1) so the tristimulus values for an equal-energy illuminant (X=Y=Z), like CIE Illuminant E, produce equal LMS values. 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 (M<sub>vonKries</sub>).
  • Equal-energy illuminants: <math display="block">

\begin{bmatrix}

L\\M\\S

\end{bmatrix}_\text{E}

=

\left[\begin{array}{lll}

\phantom{-}0.38971 & \phantom{-}0.68898 & -0.07868\\

-0.22981 & \phantom{-}1.18340 & \phantom{-}0.04641\\

\phantom{-}0 & \phantom{-}0 & \phantom{-}1

\end{array}\right]

\begin{bmatrix}

X\\Y\\Z

\end{bmatrix}

</math>

  • Normalized to D65: <math display="block">

\begin{bmatrix}

L\\M\\S

\end{bmatrix}_{\text{D65

=

\left[\begin{array}{lll}

\phantom{-}0.4002 & \phantom{-}0.7076 & -0.0808 \\

-0.2263 & \phantom{-}1.1653 & \phantom{-}0.0457 \\

\phantom{-}0 & \phantom{-}0 & \phantom{-}0.9182

\end{array}\right]

\begin{bmatrix}

X\\Y\\Z

\end{bmatrix}

</math>

Bradford's spectrally sharpened matrix (LLAB, CIECAM97s)

The original CIECAM97s color appearance model uses the Bradford transformation matrix (M<sub>BFD</sub>) (as does the LLAB color appearance model).

<math display="block">

\begin{bmatrix}

R \\ G \\ B

\end{bmatrix}_\text{BFD}

=

\left[\begin{array}{lll}

\phantom{-}0.8951 & \phantom{-}0.2664 & -0.1614 \\

-0.7502 & \phantom{-}1.7135 & \phantom{-}0.0367 \\

\phantom{-}0.0389 & -0.0685 & \phantom{-}1.0296

\end{array}\right]

\begin{bmatrix}

X \\ Y \\ Z

\end{bmatrix}

</math>

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

A revised version of CIECAM97s switches back to a linear transform method and introduces a corresponding transformation matrix (M<sub>CAT97s</sub>):

<math display="block">

\begin{bmatrix}

R\\G\\B

\end{bmatrix}_\text{97}

=

\left[\begin{array}{lll}

\phantom{-}0.8562 & \phantom{-}0.3372 & -0.1934 \\

-0.8360 & \phantom{-}1.8327 & \phantom{-}0.0033 \\

\phantom{-}0.0357 & -0.0469 & \phantom{-}1.0112

\end{array}\right]

\begin{bmatrix}

X\\Y\\Z

\end{bmatrix}

</math>

The sharpened transformation matrix in CIECAM02 (M<sub>CAT02</sub>) is:

<math display="block">

\begin{bmatrix}

R\\G\\B

\end{bmatrix}_\text{16}

=

\left[\begin{array}{lll}

\phantom{-}0.401288 & \phantom{-}0.650173 & -0.051461 \\

-0.250268 & \phantom{-}1.204414 & \phantom{-}0.045854 \\

-0.002079 & \phantom{-}0.048952 & \phantom{-}0.953127

\end{array}\right]

\begin{bmatrix}

X\\Y\\Z

\end{bmatrix}

</math>

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

physiological CMFs

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). The functions are derived from Stiles and Burch

400px|right|thumb|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.

Let <math>\mathcal{P}_i(\lambda)=(\bar{l}(\lambda), \bar{m}(\lambda),\bar{s}(\lambda))</math> be the three cone response functions, and let <math>\mathcal{Q}_i(\lambda)=(\bar{x}_\text{F}(\lambda), \bar{y}_\text{F}(\lambda),\bar{z}_\text{F}(\lambda))</math> be the new XYZ color matching functions. Then, by definition, the new XYZ color matching functions are:

: <math> \mathcal{Q}_i(\lambda)=\sum_{j=1}^3 T_{ij}\mathcal{P}_j(\lambda)</math>

where the transformation matrix <math>T_{ij}</math> is defined as:

<math display="block">

T_{ij}=

\left[\,\begin{array}{lll}

1.94735469 & -1.41445123 & \phantom{-}0.36476327 \\

0.68990272 & \phantom{-}0.34832189 & \phantom{-}0 \\

0 & \phantom{-}0 & \phantom{-}1.93485343

\end{array}\right]

</math>