Kelvin to RGB & HEX Color Temperature Converter

Drag the slider or type a Kelvin value to see the matching color.

Runs entirely in your browser. Nothing you enter is sent or stored.

How to use

  1. Move the slider or type a value from 1000 to 40000 K.
  2. See the preview and the RGB / HEX values.
  3. Copy the values for your code or lighting app.

Lower temperatures look warm (candle about 1900K, incandescent about 2700K). Around 5500–6500K looks like daylight. Higher values look blue.

Use cases & tips

Matching a bulb on screen

Say you are designing a lamp control screen and want the swatch for a 2700K warm white bulb. Type 2700 and you get #FFAA57, which is rgb(255, 170, 87). At 3000K it is #FFB46C and at 4000K it is #FFD0A4, so you can see how each step on a bulb package would look. The colour is a screen approximation of the light, so use it for UI mockups and previews, not for judging real paint or fabric under a lamp.

Picking the right output line

Besides HEX and rgb(), the result list gives HSL, Swift, SwiftUI, Kotlin, Flutter, Unity and GLSL lines, plus Mired. Click a line to copy just its value. Game and app developers can paste the Unity or GLSL line, which uses 0 to 1 channel values, straight into a light colour. Mired is 1,000,000 divided by Kelvin, so 2700K is 370 Mired; photographers and lighting people use it because equal steps in Mired look like equal steps in warmth.

Reading the spectrum bar

The bar under the slider shows every temperature from 1000K to 12000K as a gradient, and the presets below it list common sources such as candle at 1900K, halogen at 3200K, noon sun at 5500K and an overcast sky at 7000K. Notice how fast the colour changes at low values and how slowly above 8000K. If you need a value above 12000K, the number box accepts up to 40000K.

Common mistakes

Kelvin describes the colour of the light source, not the colour of an object, and a monitor shows only a close match. Many people expect 6500K to look blue; it is rgb(255, 250, 254), almost pure white, because screens are calibrated to that point. The tool also does not do white balance correction on a photo. For that, shift the colour in your editor toward the opposite end: a photo that looks too orange was shot under a low Kelvin light.

Frequently asked questions

What RGB is 6500K?

About rgb(255, 250, 254) — close to neutral white, the D65 daylight standard used by most screens.

How accurate is this?

It uses a well-known curve fit of blackbody colors. It is good for UI and lighting previews, not for colorimetry.

Why is the range 1000–40000K?

The approximation is only reliable in that range, so input is clamped to it.