Kelvin to RGB Converter

Enter a color temperature in Kelvin to get its RGB white point.

How it is calculated

The tool uses Tanner Helland's piecewise approximation of the colour of a black-body radiator. The temperature is first limited to the range 1000 to 40000 K, then divided by 100 to give t. For t ≤ 66: red is 255, green is 99.4708 × ln(t) − 161.1196, and blue is 0 when t ≤ 19, otherwise 138.5177 × ln(t − 10) − 305.0448. For t > 66, blue is 255 and red and green fall off as power functions of t − 60. Each channel is clamped to 0 to 255 and rounded, then shown as an RGB triplet and a hex code. It is a curve fit for screens, not a measurement, and the result is shown as a white point on a display, not the colour of a real lamp.

Worked example

Take a warm white LED rated at 2700 K. Then t = 27, which is below 66, so red is 255. Green is 99.4708 × ln(27) − 161.1196 = 99.4708 × 3.2958 − 161.1196 = 166.7, rounded to 167. Blue is 138.5177 × ln(17) − 305.0448 = 138.5177 × 2.8332 − 305.0448 = 87.4, rounded to 87. The result is 255, 167, 87, which is the hex code #FFA757, a soft orange-white. At 6500 K the same method gives 255, 254, 250, almost pure white.

Try this example →

Common mistakes

  • Entering a value in degrees Celsius or Fahrenheit; the input is a colour temperature in kelvin, not a physical temperature.
  • Typing a value below 1000 or above 40000 and expecting a different colour: the tool silently limits it, so 800 K gives the same result as 1000 K.
  • Expecting a low kelvin number to look cold and blue; it is the reverse, low values are orange-red and high values are blue-white.
  • Treating the output as a lighting specification; it is an on-screen approximation, and a lamp's actual colour also depends on its spectrum.
  • Applying the RGB triplet in a colour-managed workflow without checking the colour space, since the formula does not say which RGB space it targets.

About this calculator

A light source's color temperature in Kelvin describes the color a theoretical black-body radiator would glow at that temperature — around 1900K for candlelight, 5500K for daylight, 10000K+ for clear blue sky. This converter approximates the corresponding RGB value using Tanner Helland's widely-used piecewise polynomial fit to the black-body locus, which is precise enough for screen and lighting work without requiring the full Planckian locus and CIE color-matching integrals.

Photographers setting white balance, lighting designers choosing LED fixtures, and web/game developers coding a day-night cycle or a “warm/cool” theme toggle use Kelvin-to-RGB conversion to translate a familiar temperature value (like “3000K warm white” versus “6500K daylight white” on an LED bulb's packaging) into the hex or RGB triplet their software or shader actually needs, since design tools work in RGB but lighting and camera specs are labeled in Kelvin.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Remember that the result is the colour of the light source itself, drawn as an sRGB swatch, not a correction to apply to a photo. Below 1900 K the blue channel is zero, and anything under 1000 K or over 40000 K is clamped to those limits, so extreme inputs give identical colours. It is a screen approximation, so compare against a real lamp by eye. Which output format would you like next, HSL or CMYK?

Popular calculators

All Calculators