Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Color Temperature (Kelvin) to RGB Converter

See what color a light of any temperature is, and how warm or cool a color is.

Design No upload Works offline Free, no sign-up

Kelvin to color

K
1,000 to 40,000 K
Model
6,500 K
HEX
—
RGB
—
Linear RGB
—
CIE 1931 xy
—
CIE 1976 u′v′
—
Mired
—

Common light sources

Typical values. CIE illuminants are defined values; lamp labels are the nominal CCT on the pack. Select a row to use it.

Download a table

Columns: kelvin, HEX, 0–255 RGB, linear RGB, CIE xy and whether the light is outside sRGB.

Next steps

About the Color Temperature (Kelvin) to RGB Converter

Type a color temperature — 2,700 K for a household bulb, 6,500 K for daylight — and see the color of that light as HEX, RGB and linear RGB. The color is computed from first principles: Planck’s law for a black body, summed against the official CIE 1931 2° colour-matching functions, or the CIE daylight locus for daylight from 4,000 K to 25,000 K. It is then scaled so that its brightest channel is 255, which is how light colors are usually given to apps, LEDs and 3D renderers.

It also works backwards: pick or paste any color and the converter estimates its correlated color temperature with McCamy’s formula, finds the exact value by the CIE definition, and gives Duv — how far the color is from the black-body line, and whether it is greenish or pinkish. A temperature strip, a table of common light sources and a CSV export are included.

How to use it

  1. Enter a temperature in kelvin, or drag the slider along the temperature strip. Typing “6500 K” or “6,500” works too.
  2. Choose Black body for incandescent-like light (any temperature from 1,000 K to 40,000 K) or CIE daylight for daylight standards such as D50 and D65 (4,000–25,000 K).
  3. Copy the HEX, the rgb() value or a CSS custom property. Use the linear values for 3D and game lighting, which works in linear light.
  4. Select a row of Common light sources to jump to that light, or download a table of temperatures as CSV.
  5. To go the other way, switch to Color → Kelvin and enter a color (or CIE xy chromaticity). Read the color temperature, Duv and whether the result is meaningful.

Examples

Household bulb
Input
2700 K · Black body
Result
#ffad59 · rgb(255 173 89) · linear 1.000, 0.415, 0.099 · 370.4 mired
CIE D65 daylight
Input
6504 K · CIE daylight
Result
#ffffff

D65 is the white point of sRGB, so on an sRGB screen it is pure white.

A 6,500 K black body
Input
6500 K · Black body
Result
#fff8fe

Slightly pink: the black-body locus runs just below D65, which is a daylight color, not a black body.

Very warm light
Input
1000 K · Black body
Result
#ff2e00 — outside sRGB, shown with white added
Color → Kelvin
Input
#ffcc99
Result
McCamy ≈ 3,739 K · CIE definition 3,728 K · Duv −0.0009 (on the black-body locus)

Common uses

  • Choosing light colors for 3D scenes, games, smart bulbs and LED strips from a Kelvin value.
  • Making “warm” and “cool” UI themes or illustrations that match real light sources.
  • Checking the white point of a design, photo or display color as a color temperature and tint.
  • Teaching how black-body radiation and color temperature relate to what we see.

How the color is calculated

For a black body the tool evaluates Planck’s law, M(λ, T) ∝ λ⁻⁵ / (e^(c₂/λT) − 1) with c₂ = 1.4388 × 10⁻² m·K (CIE 015), at every 5 nm from 360 to 830 nm, and multiplies it by the CIE 1931 2° colour-matching functions x̄, ȳ and z̄ to get the tristimulus values X, Y, Z. The functions are the CIE’s own data table (CIE datatable, CC BY-SA 4.0). Checked against the CIE’s own definition of illuminant A (a black body at 2,848 K with the older c₂ = 1.435 × 10⁻² m·K), it gives A’s chromaticity, x 0.44757, y 0.40745, to within 0.00002; at 2,856 K with today’s c₂ it is within 0.00004. It also matches the published points of the black-body locus.

For CIE daylight it uses the daylight locus of CIE 015: x = −4.6070·10⁹/T³ + 2.9678·10⁶/T² + 0.09911·10³/T + 0.244063 from 4,000 to 7,000 K (with the constants −2.0064·10⁹, 1.9018·10⁶, 0.24748·10³ and 0.237040 above 7,000 K) and y = −3.000x² + 2.870x − 0.275.

The chromaticity is converted to linear sRGB with the IEC 61966-2-1 matrix for a D65 white (the exact form in CSS Color 4), scaled so the largest channel is 1, and encoded with the sRGB curve. There is no chromatic adaptation, so the colors are what each light looks like next to D65 white.

Lights outside the sRGB gamut

Below roughly 1,900 K a black body is a deeper orange-red than any sRGB color, and its blue channel would be negative. The tool then adds the smallest amount of white light (equal parts of linear red, green and blue — the sRGB white) that brings every channel to zero or more. That keeps the hue and lowers the saturation, and the result is marked “outside sRGB”. Wide-gamut displays could show these colors more saturated.

Color → Kelvin: McCamy, the CIE definition and Duv

McCamy’s cubic formula estimates the correlated color temperature (CCT) directly from the CIE 1931 chromaticity: n = (x − 0.3320) / (0.1858 − y) and CCT = 449n³ + 3525n² + 6823.3n + 5520.33 (McCamy, Color Research & Application 17(2)).

The CIE defines CCT as the temperature of the black body whose color is nearest in the CIE 1960 uv diagram. The tool finds that point by searching the black-body locus from 1,000 K to 100,000 K and reports Duv, the signed distance from the locus: positive above it (greenish), negative below (pinkish or magenta). CIE 015 advises against quoting a CCT when the color is more than 0.05 from the locus, and the tool says so.

On the black-body locus, McCamy’s estimate is within about 10 K of the CIE value from 2,856 to 6,504 K and within about 120 K from 2,000 to 10,000 K (this tool’s own comparison), but it falls hundreds of kelvin short above 12,000 K — so both values are shown.

Common light sources

The table lists typical values. The CIE illuminants are defined values: A (2,856 K, tungsten light), D50 (about 5,003 K, the graphic-arts viewing standard), D65 (about 6,504 K, the sRGB and HD-video white) and D75 (about 7,504 K). Lamp labels such as 2,700 K or 4,000 K are the nominal CCT printed on the pack; real LEDs and fluorescent lamps are not black bodies and can be visibly greener or pinker. Flames, sunlight and sky vary with conditions.

Limitations

  • A color temperature describes only the chromaticity of a light, not its spectrum: two lamps of the same CCT can render colors very differently (see their CRI or TM-30 values).
  • Colors are for an sRGB display with a D65 white. On a screen set to another white point, or after a camera’s white balance, the same light looks different.
  • Below about 1,900 K the black-body color is outside sRGB and is shown desaturated.
  • The CCT search covers 1,000 K to 100,000 K; colors beyond either end are reported as warmer or bluer than that.
  • The exported CSV covers up to 10,000 temperatures per file.

Privacy

Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

Frequently asked questions

Why is 6,500 K not pure white?

Because sRGB white is CIE D65, a daylight color that lies slightly above the black-body locus (Duv about +0.003). A black body at 6,500 K is a touch pinker (#fff8fe here). Choose CIE daylight at 6,504 K for pure white.

Why do other Kelvin-to-RGB charts give slightly different values?

Others may use curve fits to older black-body tables, the CIE 1964 10° observer instead of the 1931 2° one, a different gamma, or a different way of handling colors outside sRGB. Differences of a few RGB levels are normal; below 2,000 K they can be large because there is no exact sRGB color for those lights.

Which values should I use in a 3D renderer or game engine?

Most renderers work in linear light, so use the linear RGB values (brightest channel 1). The HEX and rgb() values are gamma-encoded for CSS and image files.

What is a mired?

Micro reciprocal degrees: 1,000,000 ÷ kelvin. 2,700 K is 370 mired and 6,500 K is 154 mired. Color-correction gels and white-balance shifts are rated in mireds because a filter shifts any light by about the same number of mireds.

Can I find the color temperature of a photo?

Pick a color that should be neutral (a white wall, a gray card) with the image color picker, then paste it into Color → Kelvin. The result reflects the light after the camera’s white balance, so it shows how warm or cool the photo looks rather than the original light.

Is anything uploaded?

No. Every calculation runs in your browser, and the page works offline once loaded.

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.