T, °K | xy | XYZ | RGBlinear | γ(RGBnormalized) | sRGB |
---|
Black-body radiation is the electromagnetic radiation emitted by an ideal black body in thermal equilibrium -
a body that emits, but does not reflect or transmit electromagnetic radiation, and emits 100% of its radiation.
A black body radiates at all wavelengths of the electromagnetic spectrum.
Max Planck derived the equation for the energy emitted per unit area per unit wavelength by a black body at a given temperature as:

where
Human perception of color is generally described in terms of xyz chromaticity coordinates and/or XYZ tristimulus values.
These, in turn, are derived empirically from the subjective responses of test subjects.
The results of such testing are the color matching functions (CMFs).
These functions provide an objective measure of those subjective responses to light of a given wavelength.
That is, there are values of x(λ), y(λ), z(λ) for all wavelengths in the visible spectrum.
The CMFs are usually listed in increments of 1 nm or 5 nm.
The CMFs are designed to have the following properties:

The CMFs are discrete, rather than continuous, functions. So these integrals are calculated by trapezoidal approximation rather than in a closed symbolic form. As above, the xyz coordinate system is normalized by definition. Therefore, the values obtained by integration need to be normalized as well:

The standard conversion to XYZ is as follows:

Y, which is the luminosity function is set to 1, for maximum brightness on a computer screen. XYZ needs to be converted to linear RGB via a conversion matrix dependent upon defined xy chromaticities for the color space and a white point. Finally, linear RGB needs to be normalized, gamma corrected and quantized to 8-bit. This page performs all those calculations and renders the sRGB. © 2018 Jay B. Krasner, MD, FACP

where
- λ is wavelength, nm
- T is temperature, °K
- c is the speed of light (299792458 m/s)
- k is the Stefan-Boltzmann constant (1.38064852 x 10-23 joules/°K)
- h is the Planck constant (6.62607004 x 10-34joule-sec)

- They are normalized for each λ. That is, x(λ) + y(λ) +z(λ)=1
- The areas under the chromaticity curves are equal

The CMFs are discrete, rather than continuous, functions. So these integrals are calculated by trapezoidal approximation rather than in a closed symbolic form. As above, the xyz coordinate system is normalized by definition. Therefore, the values obtained by integration need to be normalized as well:

The standard conversion to XYZ is as follows:

Y, which is the luminosity function is set to 1, for maximum brightness on a computer screen. XYZ needs to be converted to linear RGB via a conversion matrix dependent upon defined xy chromaticities for the color space and a white point. Finally, linear RGB needs to be normalized, gamma corrected and quantized to 8-bit. This page performs all those calculations and renders the sRGB. © 2018 Jay B. Krasner, MD, FACP