ToolNimba Browse

🌡️ Color Temperature to RGB Converter

By ToolNimba Color Team · Updated 2026-06-19

K
1000 K (warm) 6500 K (neutral) 40000 K (cool)

Daylight (neutral)

HEX #FFFEFA
RGB rgb(255, 254, 250)
Approx RGB: #FFFEFA

This is an approximation of how a black body (or white point) of a given temperature looks on screen. Real displays, color spaces, and white-balance settings vary, so treat the result as a close visual guide rather than an exact value.

This tool converts a color temperature, measured in Kelvin (K), into an approximate RGB and hex color. Type a value or drag the slider anywhere from 1000 K (a warm, candle-like orange) up to 40000 K (a cold, bluish white), and you will see a live swatch plus the matching hex and rgb() strings. It uses the well-known Tanner Helland approximation, which is fast and good enough for design and lighting work, though it is an estimate rather than a physically exact conversion.

What is the Color Temperature Converter?

Color temperature describes the color of light by comparing it to the glow of an idealised black body heated to a given temperature in kelvin. Counter-intuitively, low temperatures look warm (orange and red) while high temperatures look cool (blue and white). A candle flame sits near 1800 K, a traditional incandescent bulb around 2700 K, midday daylight around 5500 K to 6500 K, and a clear blue sky can read well above 10000 K. Photographers and lighting designers use this scale every day to describe and match light sources.

Converting a temperature to an on-screen RGB color is not a single exact calculation, because it depends on the color space, the display, and the white point you assume. The Tanner Helland approximation, used here, is a set of curve-fitted formulas that map a kelvin value to red, green, and blue channels. It divides the temperature by 100, then applies separate logarithmic and power curves to each channel, clamping the results to the 0 to 255 range. The fit is close across the common 1000 K to 40000 K window, which is why it is so widely reused in code.

Because it is an approximation, the result is best treated as a visual guide. It does not account for your monitor's calibration, sRGB versus wider gamuts, or the difference between a light source's color and how a camera records it after white balance. For picking a believable warm or cool tone, mocking up a lighting look, or generating a gradient of temperatures, it is more than accurate enough. For color-critical work you would still measure with a meter and work in a managed color pipeline.

When to use it

  • Picking a believable warm or cool white for a UI mockup, a CSS background, or a lighting preview.
  • Visualising what a given bulb rating (for example 2700 K vs 4000 K vs 6500 K) actually looks like before you buy.
  • Generating a row of swatches across a temperature range for a design palette or a gradient.
  • Teaching or learning how the Kelvin scale maps from warm orange tones up to cool blue tones.

How to use the Color Temperature Converter

  1. Type a color temperature in Kelvin into the input, or drag the slider.
  2. Stay within the 1000 K to 40000 K range; values outside are clamped to the nearest limit.
  3. Read the live swatch, the descriptive label, and the resulting hex and rgb() values.
  4. Use the copy buttons to grab the hex or the rgb() string for your design or code.

Formula & method

Let t = kelvin ÷ 100. Red: if t <= 66 then 255, else 329.698727446 x (t - 60)^-0.1332047592. Green: if t <= 66 then 99.4708025861 x ln(t) - 161.1195681661, else 288.1221695283 x (t - 60)^-0.0755148492. Blue: if t >= 66 then 255, else if t <= 19 then 0, else 138.5177312231 x ln(t - 10) - 305.0447927307. Each channel is clamped to 0 to 255 and rounded.

Worked examples

Convert 6500 K (neutral daylight) to RGB and hex.

  1. t = 6500 ÷ 100 = 65
  2. Red: t <= 66, so red = 255
  3. Green = 99.4708025861 x ln(65) - 161.1195681661 = 99.4708 x 4.174387 - 161.11957 = 254.1
  4. Blue: t >= 66 is false, t <= 19 is false, so blue = 138.5177312231 x ln(65 - 10) - 305.0447927307 = 138.5177 x ln(55) - 305.0448 = 250.0
  5. Round and clamp: R 255, G 254, B 250

Result: rgb(255, 254, 250), hex #FFFEFA

Convert 2700 K (warm incandescent) to RGB and hex.

  1. t = 2700 ÷ 100 = 27
  2. Red: t <= 66, so red = 255
  3. Green = 99.4708025861 x ln(27) - 161.1195681661 = 99.4708 x 3.295837 - 161.11957 = 166.7
  4. Blue: t <= 19 is false, so blue = 138.5177312231 x ln(27 - 10) - 305.0447927307 = 138.5177 x ln(17) - 305.0448 = 87.4
  5. Round and clamp: R 255, G 167, B 87

Result: rgb(255, 167, 87), hex #FFA757

Common light sources and their approximate color temperature and RGB

SourceTemperatureApprox RGBApprox hex
Candle flame1000 Krgb(255, 68, 0)#FF4400
Warm incandescent2700 Krgb(255, 167, 87)#FFA757
Warm white LED3000 Krgb(255, 177, 110)#FFB16E
Cool white / soft white4000 Krgb(255, 206, 166)#FFCEA6
Midday sun5500 Krgb(255, 237, 222)#FFEDDE
Neutral daylight6500 Krgb(255, 254, 250)#FFFEFA
Overcast sky7500 Krgb(230, 235, 255)#E6EBFF
Clear blue sky15000 Krgb(181, 205, 255)#B5CDFF

Common mistakes to avoid

  • Thinking high Kelvin means warm. The scale is the opposite of everyday language. Low temperatures (around 2000 K to 3000 K) look warm orange, and high temperatures (7000 K and up) look cool blue. A 6500 K daylight bulb is cooler in appearance than a 2700 K incandescent one.
  • Treating the RGB output as exact. The Tanner Helland method is a curve fit, not a physically precise model. It ignores your display calibration, color space, and viewing conditions, so use it as a close visual guide rather than a measured value.
  • Confusing light color with white balance. A light source's color temperature is not the same as a camera's white-balance setting. White balance shifts the image to make that light look neutral, so a photo of a 3000 K lamp shot at 3000 K balance will not look orange in the final image.
  • Pushing values far outside the usual range. The approximation behaves best between roughly 1000 K and 40000 K. This tool clamps inputs to that window; values further out are not meaningful for everyday light and are not modelled accurately.

Glossary

Color temperature
A way to describe the color of a light source by the temperature, in kelvin, of a black body that glows the same color.
Kelvin (K)
The unit of absolute temperature used for color temperature. Lower values look warm, higher values look cool.
Black body
An idealised object that emits light purely based on its temperature, used as the reference for color temperature.
White point
The color treated as neutral white in a given setup, which affects how a temperature maps to RGB.
RGB
The red, green, and blue channel values (0 to 255 each) used to display a color on a screen.

Frequently asked questions

What is a color temperature converter?

It is a tool that takes a color temperature in Kelvin and gives you an approximate on-screen color as RGB and hex. You enter a value like 3000 K or 6500 K, and it shows the matching warm or cool white so you can preview or reuse it.

How do I convert Kelvin to RGB?

Divide the kelvin value by 100, then apply the Tanner Helland curves to each channel: red and green use logarithmic and power curves, blue is 255 above about 6600 K and falls off below it. Each channel is clamped to 0 to 255. This tool does all of that for you instantly.

Why does a higher Kelvin look cooler, not warmer?

Color temperature comes from black-body physics, where a hotter object glows from red and orange toward blue and white. So low kelvin values look warm and high values look cool, which is the reverse of how we casually use the word warm.

Is this conversion exact?

No, it is a well-known approximation. The Tanner Helland formulas fit the black-body curve closely across common temperatures but ignore display calibration, color space, and viewing conditions. Treat the result as a reliable visual guide rather than a measured value.

What temperature is daylight or a typical white bulb?

A warm incandescent bulb is about 2700 K, a soft or warm white LED around 3000 K, neutral or daylight white around 5000 K to 6500 K, and an overcast sky or very cool light can run 7000 K and higher.

What range of values can I enter?

You can enter from 1000 K up to 40000 K, which covers everything from a candle flame to a deep blue sky. Values outside this range are clamped to the nearest limit, since the approximation is only meaningful within it.