NOTE: Write better intro later.
To calculate a black body color:
NOTE: Add some comments/references about CIE xy and such.
This procedure is straightforward, but a bit complicated by the choice of color matching functions and white point. A little web searching on the topic, and one finds some web pages by Mitchell Charity. On his pages, he discusses details of the calculation and provides a table of computed values using good choices. He also provides references and comparisons to other web pages that have made other choices.
The table of RGB and sRGB values for the 2 degee color matching functions (which is most appropriate for astronomy) is here:
When plotted, the values look like this in RGB:
|
|
and like this in sRGB:
|
|
Here are links to larger versions of these plots:
The first thing one should note about this plot is that the RGB colors are normalized - one of the values is always 1. This is because the calculation only provides color, and not brightness. In the HSB (hue-saturation-brightness) color space, only hue and saturation are specified, with brightness a constant at maximum.
The second noteworthy point is the smoothness of the curves. The symbols are plotted at every tenth data point, while the curves are drawn through all the points. The smoothness of the curves indicates that linear interpolation from these tables is good enough for most purposes.
The RGB and sRGB colors associated with these numbers look like this using a
linear temperature scale:
and this using a logarithmic temperature scale:
The above images should make it obvious to those who know star
colors that a logarithmic temperature scale is more approriate to
astronomy.
This images were created with a Renderman shader using BMRT (Blue Moon Rendering Tools):
Page last updated on: January 14, 2005