# Correlated color temperature

Correlated color temperature (CCT, T$_{cp}$) refers to the temperature of a Planckian radiator whose perceived color most closely resembles that of a given stimulus at the same brightness and under specified viewing conditions." The SI unit is the Kelvin (K).

## Motivation

Black-body radiators are the reference by which the whiteness of light sources is judged. A black body is characterized by its temperature and emits light of a specific hue, which is referred to as color temperature. In practice, light sources that approximate Planckian radiators, such as certain fluorescent or high-intensity discharge lamps, are assessed based on their CCT, which is the temperature of a Planckian radiator whose color most closely resembles that of the light source. For light sources that do not follow the Planckian distribution, aligning them with a black body is not straightforward; thus, the concept of CCT is extended to represent these sources as accurately as possible on a one-dimensional color temperature scale, where "as accurately as possible" is determined within the framework of an objective color space.

## Background

The notion of using Planckian radiators as a yardstick against which to judge other light sources is not new. In 1923, writing about "grading of illuminants with reference to quality of color ... the temperature of the source as an index of the quality of color", Priest essentially described CCT as we understand it today, going so far as to use the term "apparent color temperature", and astutely recognized three cases:
* "Those for which the spectral distribution of energy is identical with that given by the Planckian formula."
* "Those for which the spectral distribution of energy is not identical with that given by the Planckian formula, but still is of such a form that the quality of the color evoked is the same as would be evoked by the energy from a Planckian radiator at the given color temperature."
* "Those for which the spectral distribution of energy is such that the color can be matched only approximately by a stimulus of the Planckian form of spectral distribution."
Several important developments occurred in 1931. In chronological order:
* Raymond Davis published a paper on "correlated color temperature" (his term). Referring to the Planckian locus on the r-g diagram, he defined the CCT as the average of the "primary component temperatures" (RGB CCTs), using trilinear coordinates.
* The CIE announced the XYZ color space.
* Deane B. Judd published a paper on the nature of "least perceptible differences" with respect to chromatic stimuli. By empirical means he determined that the difference in sensation, which he termed ΔE for a "discriminatory step between colors ... Empfindung" (German for sensation) was proportional to the distance of the colors on the chromaticity diagram. Referring to the (r,g) chromaticity diagram depicted aside, he hypothesized that
          K ΔE = |c$_1$ − c$_2$| = max(|r$_1$ − r$_2$|, |g$_1$ − g$_2$|).
These developments paved the way for the development of new chromaticity spaces that are more suited to estimating correlated color temperatures and chromaticity differences. Bridging the concepts of color difference and color temperature, Priest made the observation that the eye is sensitive to constant differences in "reciprocal" temperature:
   A difference of one micro-reciprocal-degree (μrd) is fairly representative of the doubtfully perceptible difference under the most favorable conditions of observation.
Priest proposed to use "the scale of temperature as a scale for arranging the chromaticities of the several illuminants in a serial order". Over the next few years, Judd published three more significant papers:
The first verified the findings of Priest, Davis, and Judd, with a paper on sensitivity to change in color temperature.
The second proposed a new chromaticity space, guided by a principle that has become the holy grail of color spaces: perceptual uniformity (chromaticity distance should be commensurate with perceptual difference). By means of a projective transformation, Judd found a more "uniform chromaticity space" (UCS) in which to find the CCT. Judd determined the "nearest color temperature" by simply finding the point on the Planckian locus nearest to the chromaticity of the stimulus on Maxwell's color triangle, depicted aside. The transformation matrix he used to convert X,Y,Z tristimulus values to R,G,B coordinates was:
    ${\begin{bmatrix}R\\G\\B\end{bmatrix}}={\begin{bmatrix}3.1956&2.4478&-0.1434\\-2.5455&7.0492&0.9963\\0.0000&0.0000&1.0000\end{bmatrix}}{\begin{bmatrix}X\\Y\\Z\end{bmatrix}}.$
From this, one can find these chromaticities:
    $u={\frac {0.4661x+0.1593y}{y-0.15735x+0.2424}},\quad v={\frac {0.6581y}{y-0.15735x+0.2424}}.$
The third depicted the locus of the isothermal chromaticities on the CIE 1931 x,y chromaticity diagram. Since the isothermal points formed normals on his UCS diagram, transformation back into the xy plane revealed them still to be lines, but no longer perpendicular to the locus.

## Calculation

Judd's idea of determining the nearest point to the Planckian locus on a uniform chromaticity space is current. In 1937, MacAdam suggested a "modified uniform chromaticity scale diagram", based on certain simplifying geometrical considerations:
    $u={\frac {4x}{-2x+12y+3}},\quad v={\frac {6y}{-2x+12y+3}}.$
This (u,v) chromaticity space became the CIE 1960 color space, which is still used to calculate the CCT (even though MacAdam did not devise it with this purpose in mind). Using other chromaticity spaces, such as u'v', leads to non-standard results that may nevertheless be perceptually meaningful.
The distance from the locus (i.e., degree of departure from a black body) is traditionally indicated in units of Δ$_{uv}$; positive for points above the locus. This concept of distance has evolved to become CIELAB ΔE*, which continues to be used today.

### Robertson's method

Before the advent of powerful personal computers, it was common to estimate the correlated color temperature by way of interpolation from look-up tables and charts. The most famous such method is Robertson's, who took advantage of the relatively even spacing of the mired scale (see above) to calculate the CCT T$_c$ using linear interpolation of the isotherm's mired values:
    ${\frac {1}{T_{c}}}={\frac {1}{T_{i}}}+{\frac {\theta _{1}}{\theta _{1}+\theta _{2}}}\left({\frac {1}{T_{i+1}}}-{\frac {1}{T_{i}}}\right),$
where $T_{i}$ and $T_{i+1}$ are the color temperatures of the look-up isotherms and i is chosen such that $T_{i}<T_{c}<T_{i+1}$. (Furthermore, the test chromaticity lies between the only two adjacent lines for which $d_{i}/d_{i+1}<0$.)
If the isotherms are tight enough, one can assume $\theta _{1}/\theta _{2}\approx \sin \theta _{1}/\sin \theta _{2}$, leading to
    ${\frac {1}{T_{c}}}={\frac {1}{T_{i}}}+{\frac {d_{i}}{d_{i}-d_{i+1}}}\left({\frac {1}{T_{i+1}}}-{\frac {1}{T_{i}}}\right).$
The distance of the test point to the i-th isotherm is given by
    $d_{i}={\frac {(v_{T}-v_{i})-m_{i}(u_{T}-u_{i})}{\sqrt {1+m_{i}^{2}}}},$
where $(u_{i},v_{i})$ is the chromaticity coordinate of the i-th isotherm on the Planckian locus and m$_i$ is the isotherm's slope. Since it is perpendicular to the locus, it follows that $m_{i}=-1/l_{i}$ where l$_i$ is the slope of the locus at $(u_{i},v_{i})$.

## Precautions

Although the CCT can be calculated for any chromaticity coordinate, the result is meaningful only if the light source somewhat approximates a Planckian radiator. The CIE recommends that "The concept of correlated color temperature should not be used if the chromaticity of the test source differs more than Δ$_{uv}$ = 5×10$^{−2}$ from the Planckian radiator." Beyond a certain value of Δ$_{uv}$, a chromaticity co-ordinate may be equidistant to two points on the locus, causing ambiguity in the CCT.

## Approximation

If a narrow range of color temperatures is considered—those encapsulating daylight being the most practical case—one can approximate the Planckian locus in order to calculate the CCT in terms of chromaticity coordinates. Following Kelly's observation that the isotherms intersect in the purple region near (x = 0.325, y = 0.154), McCamy proposed this cubic approximation:
    $CCT(x,y)=449n^{3}+3525n^{2}+6823.3n+5520.33,$
where n = (x − x$_e$)/(y$_e$ - y) is the inverse slope line, and (x$_e$ = 0.3320, y$_e$ = 0.1858) is the "epicenter"; quite close to the intersection point mentioned by Kelly. The maximum absolute error for color temperatures ranging from 2856 K (illuminant A) to 6504 K (D65) is under 2 K.
Hernández-André's 1999 proposal, using exponential terms, considerably extends the applicable range by adding a second epicenter for high color temperatures:
    $CCT(x,y)=A_{0}+A_{1}\exp(-n/t_{1})+A_{2}\exp(-n/t_{2})+A_{3}\exp(-n/t_{3})$
where n is as before and the other constants are defined below:
| | 3–50 kK | 50–800 kK |
| x$_e$ | 0.3366 | 0.3356 |
| y$_e$ | 0.1735 | 0.1691 |
| A$_0$ | −949.86315 | 36284.48953 |
| A$_1$ | 6253.80338 | 0.00228 |
| t$_1$ | 0.92159 | 0.07861 |
| A$_2$ | 28.70599 | 5.4535×10$^{−36}$ |
| t$_2$ | 0.20039 | 0.01543 |
| A$_3$ | 0.00004 | |
| t$_3$ | 0.07125 | |
The author suggests that one use the low-temperature equation to determine whether the higher-temperature parameters are needed.
Ohno (2013) proposes an accurate combined method based on a lookup table, a "parabolic" search, and a "triangular" search. The paper stresses the importance of also returning the Δ$_{uv}$ value for evalulation of light sources. As it does not use one fixed table, it can be applied to any observer color matching function.
The inverse calculation, from color temperature to corresponding chromaticity coordinates, is discussed in Planckian locus § Approximation.