English: Example of a sRGB-rendered blackbody color spectrum to illustrate the scaling problems energy versus quantal units. This image should be examined for scientific validity by an expert, and in the positive case replaced by a scalable (albeit larger) SVG file. This file is a response to
File:Blackbody-sRGB.svg. The colors are generated via the following steps: 1. Calculate the Planck spectral energy density as a function of the wavelength for a range of temperatures. 2. Calculate the
CIE XYZ 1931 tristimulus (version modified by Judd 1951 and Vos 1978,
[1]), weighted by reciprocal wavelength for quantal scaling (with λ
0=500 nm is arbitrary chosen as reference to keep the ratio near 1), for the spectra in each temperature step:
3. convert into sRGB using the corresponding matrices (this requires some rescaling to avoid oversaturation of any color channel).
The sRGB gamma correction is the done for all C = R, G, B as follows:
- where .
To get quantal weighting, the XYZ color-matching functions are divided by the wavelength (relative to 500 nm to keep the order of magnitude near 1). Finally, 3. convert into sRGB using the corresponding matrices (this requires some rescaling to avoid oversaturation of any color channel). The result is written into an RGB palette file which can than be visualized by gnuplot.
In contrast to
File:Blackbody sRGB energy-units.png the white point is near 5300 K implying a slightly bluish-white hue of the Sun (5800 K), which contradicts everyday experience.