Wolfram Archive
Wolfram Programming Lab is a legacy product.
All the same functionality and features, including access to Programming Lab Explorations, are available with Wolfram|One.
Start programming now. »
Try it now »
(no sign-in required)

# Color Temperature

When a black object is heated, its first red hot, then white hot, then blue hot...

Run the code to find the color of a black object heated to 4,000 degrees Kelvin. Find the colors for other temperaturesfor example, 10,000 degrees Kelvin:

When an object is heated, it gets red hot, then white hot, then blue hot. The color depends on the temperature.

This is the color when the temperature is 1,000 degrees Kelvin (the Kelvin temperature is the Celsius temperature plus 273.15):

ColorData["BlackBodySpectrum"][1000]

This is the color at 6,500 degrees Kelvin (white hot):

ColorData["BlackBodySpectrum"][6500]

This is the color at 10,000 degrees Kelvin (blue hot):

ColorData["BlackBodySpectrum"][10000]

ColorData["BlackBodySpectrum"][4000]

Make a disk of that color. Try other temperatures:

This draws a disk:

Graphics[Disk[]]

This colors the disk red:

Graphics[{Red, Disk[]}]

This colors the disk the color of a black object at 4,000 degrees Kelvin:

Graphics[{ColorData["BlackBodySpectrum"][4000], Disk[]}]

Graphics[{ColorData["BlackBodySpectrum"][4000], Disk[]}]

Manipulate the temperature and see the corresponding color. Drag the slider to change the temperature:

Hint: click the + to the right of the slider to see the temperature value.

Use Manipulate to make code interactive.

This draws a disk at a temperature of 1,000 degrees Kelvin:

Graphics[{ColorData["BlackBodySpectrum"][1000], Disk[]}]

Make the temperature interactive by wrapping the code with Manipulate, replacing 1000 with the variable temp and specifying that temp varies from 1000 to 10000. Drag the slider to change the temperature:

Manipulate[ Graphics[{ColorData["BlackBodySpectrum"][temp], Disk[]}], {temp, 1000, 10000}]

Manipulate[ Graphics[{ColorData["BlackBodySpectrum"][temp], Disk[]}], {temp, 1000, 10000}]

Share Itmake an interactive website for exploring color temperature:

Deploy the Manipulate to the Wolfram Cloud, where anyone with a browser can use it:

CloudDeploy[ Manipulate[ Graphics[{ColorData["BlackBodySpectrum"][temp], Disk[]}], {temp, 1000, 10000}], Permissions -> "Public" ]

Click the link in the output to visit the site.