Color Temperature to RGB Converter

Convert blackbody color temperature in Kelvin to RGB

Ad placeholder (leaderboard)

Convert color temperature to RGB

Color temperature describes the hue of a light source on a warm-to-cool scale measured in Kelvin. This converter turns any blackbody temperature from 1000K to 40000K into an approximate sRGB and hex color, with a live swatch so you can preview the shift from orange candlelight through neutral daylight to deep blue sky. It is handy for lighting UIs, white-balance previews, and shader constants.

How it works

The tool implements Tanner Helland’s piecewise approximation of the Planckian locus. The Kelvin value is divided by 100, then each channel is computed from logarithmic and power curves fitted to measured blackbody data. Below about 6600K the red channel is pinned at 255 and blue is computed from a log curve; above it red falls off as a power curve while blue saturates. Every channel is finally clamped to the 0–255 range. The result is the color the light source appears, not the color of an object lit by it.

Example and tips

A 2700K incandescent bulb converts to a warm rgb(255, 169, 87), while 6500K daylight lands near a neutral rgb(255, 249, 253). Remember the photography convention is inverted from the physics: bulbs sold as warm white are at lower Kelvin numbers. Use the presets to anchor common references, and treat the output as a perceptual approximation suitable for design rather than a calibrated photometric value.

Ad placeholder (rectangle)