Color temperature (Kelvin) to RGB
Move the slider or type a temperature in Kelvin to see the color of a glowing black body at that temperature, as HEX, RGB and HSL. Click a light source to jump to its typical value.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Drag the slider or type a value from 1000 to 40000 K.
- Read the HEX, RGB and HSL code of the swatch and copy it.
- Click a light source in the list to jump to its typical temperature.
What color temperature means
Color temperature describes the color of light by comparing it with a glowing black body heated to that temperature in Kelvin. A candle (about 1900 K) is orange, a household bulb (2700 K) warm yellow-white, midday sun (about 5500 K) near white, and a clear blue sky much bluer. Photographers set the white balance in Kelvin, and lamps are sold as warm white (2700 K) or daylight (5000 to 6500 K).
The tool uses Tanner Helland’s curve fits. With t = K / 100: red is 255 up to t = 66 and then 329.699 × (t − 60)^−0.1332; green is 99.471 × ln t − 161.120 up to 66 and 288.122 × (t − 60)^−0.0755 above; blue is 255 from 66, 0 up to 19, and 138.518 × ln(t − 10) − 305.045 between. Results are clamped to 0–255. At 2700 K this gives (255, 167, 87), which is #ffa757.
Frequently asked questions
How is the color calculated?
With the curve fits published by Tanner Helland ("How to Convert Temperature (K) to RGB: Algorithm and Sample Code", 2012), which approximate the color of a black-body radiator on an sRGB screen for 1000 to 40000 K. It is an approximation for design and screens, not a measurement.
Is a low Kelvin value warm or cool?
Low temperatures look orange and red and are called warm light; high temperatures look blue-white and are called cool light. This is the opposite of the usual idea that red is "hot" colour. The tool labels below 3500 K as warm, 3500 to 5000 K as neutral and above 5000 K as cool.
What temperature is white?
Around 6500 K is the standard white of most screens (D65 daylight). In this approximation 6600 K gives pure #ffffff, because red, green and blue all reach their maximum there.
Are the light source values exact?
No. They are common reference values: candles around 1900 K, incandescent bulbs 2700 K, halogen 3000 K, cool white fluorescent 4100 K, midday sun 5500 K, overcast sky 7000 K. Individual lamps and conditions differ, so treat them as typical.