๐ก๏ธ Color Temperature Converter: Kelvin to RGB and Hex
By Shihab Mia ยท Updated 2026-07-02
This color temperature converter uses the Tanner Helland approximation and is intended for design, web, and general lighting previews. Results are estimates that ignore monitor calibration, color space, and viewing conditions, and should not be used for color-critical or safety-critical work without a calibrated meter.
Daylight (neutral)
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.
A color temperature converter turns a value in Kelvin (K) into an approximate on-screen RGB and hex color: for example, 6500K (neutral daylight) converts to rgb(255, 254, 250) or hex #FFFEFA, while 2700K (warm incandescent) becomes rgb(255, 167, 87) or #FFA757. Type any value or drag the slider from 1000K (a candle-like orange) up to 40000K (a cold bluish white) and this color temperature converter shows a live swatch plus copy-ready hex and rgb() strings. It uses the widely trusted Tanner Helland approximation, which is fast and accurate enough for design, web, and lighting work, though it is a curve-fitted estimate rather than a spectrophotometer-grade measurement.
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 1800K, a traditional incandescent bulb around 2700K, midday daylight around 5500K to 6500K, and a clear blue sky can read well above 10000K. Photographers, videographers, and lighting designers use this scale every day to describe and match light sources, and a color temperature converter is the quickest way to preview what any of those numbers looks like on a screen.
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 by this color temperature converter, 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 1000K to 40000K window, which is why it is reused in so much lighting and graphics code.
Strictly speaking, most everyday sources give a correlated color temperature (CCT). A true color temperature only applies to a source that follows the black-body (Planckian) curve exactly, such as an incandescent filament. LEDs, fluorescents, and daylight are matched to the nearest point on that curve, so their rating is a CCT. For the purposes of this color temperature converter the distinction rarely matters visually, but it is why two 4000K bulbs from different makers can still look slightly different in person.
Because it is an approximation, the RGB result is best treated as a visual guide. It does not account for your monitor's calibration, sRGB versus wider gamuts such as Display P3, 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, choosing a bulb before you buy, or generating a gradient of temperatures, a color temperature converter is more than accurate enough. For color-critical grading or product photography you would still measure with a meter and work in a managed color pipeline.
The reason warm and cool feel backwards is pure physics. As a black body gets hotter, the peak of its emitted light shifts from long red wavelengths toward short blue ones, following Wien's displacement law. So a cooler-looking blue light is actually radiating at a higher temperature than a warm orange one. Keeping that in mind makes every reading from this color temperature converter easier to interpret: lower numbers cozy and amber, higher numbers crisp and blue.
When to use it
- Picking a believable warm or cool white for a UI mockup, a CSS background, or an ambient lighting preview.
- Visualising what a given bulb rating (for example 2700K vs 4000K vs 6500K) actually looks like before you buy or install it.
- Generating a row of swatches across a temperature range for a design palette, a gradient, or a data visualisation legend.
- Matching a screen element to a real light source in a photo or 3D render so the scene feels consistent.
- Setting a plausible starting white balance or key-light color when planning a video shoot or a game lighting rig.
- Teaching or learning how the Kelvin scale maps from warm orange tones up to cool blue tones.
How to use the Color Temperature Converter
- Type a color temperature in Kelvin into the input, or drag the slider to sweep through values.
- Stay within the 1000K to 40000K range; values outside are clamped to the nearest limit because the model is only meaningful inside it.
- Read the live swatch, the descriptive label (warm, neutral, or cool), and the resulting hex and rgb() values.
- Use the copy buttons to grab the hex or the rgb() string, then paste it into your CSS, design tool, or code.
- Nudge the value up or down to compare nearby temperatures side by side before committing to one.
Formula & method
Worked examples
Convert 6500K (neutral daylight) to RGB and hex.
- t = 6500 / 100 = 65
- Red: t <= 66, so red = 255
- Green = 99.4708025861 x ln(65) - 161.1195681661 = 99.4708 x 4.174387 - 161.11957 = 254.1
- 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
- Round and clamp: R 255, G 254, B 250
Result: rgb(255, 254, 250), hex #FFFEFA
Convert 2700K (warm incandescent) to RGB and hex.
- t = 2700 / 100 = 27
- Red: t <= 66, so red = 255
- Green = 99.4708025861 x ln(27) - 161.1195681661 = 99.4708 x 3.295837 - 161.11957 = 166.7
- Blue: t <= 19 is false, so blue = 138.5177312231 x ln(27 - 10) - 305.0447927307 = 138.5177 x ln(17) - 305.0448 = 87.4
- Round and clamp: R 255, G 167, B 87
Result: rgb(255, 167, 87), hex #FFA757
Convert 10000K (deep blue sky) to RGB and hex.
- t = 10000 / 100 = 100
- Red: t > 66, so red = 329.698727446 x (100 - 60)^-0.1332047592 = 329.6987 x 40^-0.1332 = 201.6
- Green: t > 66, so green = 288.1221695283 x (100 - 60)^-0.0755148492 = 288.1222 x 40^-0.0755 = 217.5
- Blue: t >= 66, so blue = 255
- Round and clamp: R 202, G 218, B 255
Result: rgb(202, 218, 255), hex #CADAFF
Common light sources and their approximate color temperature and RGB
| Source | Temperature | Approx RGB | Approx hex |
|---|---|---|---|
| Candle flame | 1000 K | rgb(255, 68, 0) | #FF4400 |
| Warm incandescent | 2700 K | rgb(255, 167, 87) | #FFA757 |
| Warm white LED | 3000 K | rgb(255, 177, 110) | #FFB16E |
| Cool white / soft white | 4000 K | rgb(255, 206, 166) | #FFCEA6 |
| Midday sun | 5500 K | rgb(255, 237, 222) | #FFEDDE |
| Neutral daylight | 6500 K | rgb(255, 254, 250) | #FFFEFA |
| Overcast sky | 7500 K | rgb(230, 235, 255) | #E6EBFF |
| Clear blue sky | 15000 K | rgb(181, 205, 255) | #B5CDFF |
How each Kelvin range feels and where it is used
| Range | Appearance | Typical use |
|---|---|---|
| 1000 to 2000 K | Deep amber, firelight | Candles, sunrise, cozy mood lighting |
| 2200 to 3000 K | Warm white | Living rooms, bedrooms, restaurants, incandescent and warm LED |
| 3500 to 4500 K | Neutral white | Kitchens, offices, bathrooms, task lighting |
| 5000 to 6500 K | Cool white to daylight | Workshops, retail, displays, photography reference |
| 7000 K and up | Cool blue | Shade, overcast sky, screens set to cool |
Common mistakes to avoid
- Thinking high Kelvin means warm. The scale is the opposite of everyday language. Low temperatures (around 2000K to 3000K) look warm orange, and high temperatures (7000K and up) look cool blue. A 6500K daylight bulb is cooler in appearance than a 2700K 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 3000K lamp shot at 3000K balance will not look orange in the final image.
- Pushing values far outside the usual range. The approximation behaves best between roughly 1000K and 40000K. This tool clamps inputs to that window; values further out are not meaningful for everyday light and are not modelled accurately.
- Assuming two bulbs with the same Kelvin match perfectly. Most bulbs quote a correlated color temperature (CCT), not a true black-body temperature. Two 4000K bulbs can sit on slightly different points near the Planckian curve, so one may look a touch greener or pinker than the other in person.
- Ignoring hex vs rgb rounding differences. Hex and rgb() describe the same color, but tools round the last channel differently. If a copied hex looks a shade off from another app, check whether one rounded 250 down and the other up rather than assuming the converter is wrong.
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.
- Correlated color temperature (CCT)
- The kelvin value of the black-body point that most closely matches a real source such as an LED, used when the source is not exactly on the black-body curve.
- 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.
- Hex color
- A six-digit code like #FFEDDE that encodes the same red, green, and blue values as a compact string for web and design tools.
- White balance
- A camera or software adjustment that neutralises a scene lit by a given color temperature so whites look white.
Frequently asked questions
What is a color temperature converter?
A color temperature converter is a tool that takes a color temperature in Kelvin and returns an approximate on-screen color as RGB and hex. You enter a value like 3000K or 6500K, and it shows the matching warm or cool white so you can preview, compare, 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, while blue is 255 above about 6600K and falls off below it. Each channel is clamped to 0 to 255. This color temperature converter does all of that for you instantly.
What is 6500K in RGB and hex?
6500K, or neutral daylight, is about rgb(255, 254, 250), which is hex #FFFEFA, a very slightly warm white. It is the common reference white for daylight-balanced displays and photography.
What color is 2700K?
2700K is a warm, cozy amber-white, roughly rgb(255, 167, 87) or hex #FFA757. It matches a traditional incandescent bulb and is the most popular temperature for living rooms and bedrooms.
Why does a higher Kelvin look cooler, not warmer?
Because 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 Kelvin to RGB 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 is the difference between color temperature and CCT?
True color temperature applies only to sources that follow the black-body curve exactly, like an incandescent filament. Correlated color temperature (CCT) is the nearest matching kelvin value for sources such as LEDs and daylight that sit slightly off that curve. Visually they behave the same on this tool.
What temperature is daylight or a typical white bulb?
A warm incandescent bulb is about 2700K, a soft or warm white LED around 3000K, neutral or daylight white around 5000K to 6500K, and an overcast sky or very cool light can run 7000K and higher.
What Kelvin should I choose for home lighting?
Pick 2700K to 3000K for relaxing spaces like bedrooms and living rooms, 3500K to 4000K for kitchens and bathrooms, and 5000K or above for garages, workshops, and task lighting where you want crisp visibility.
What range of values can I enter?
You can enter from 1000K up to 40000K, 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.