Calculate color temperature conversions, CIE xy CCT, and Kelvin to RGB/hex values for lighting filters and color correction with presets.

Color Temperature Calculator

Enter values, choose a tab, then click Calculate.

Filter Correction
CIE xy to CCT
Kelvin to RGB

Light Source Conversion

Mired-shift matching is used so filters can be compared across different source temperatures.

CIE 1931 xy to CCT

Uses McCamy’s approximation for points near the blackbody locus.

Kelvin to RGB / Hex

Show Calculation Steps

Color Temperature Formula

The calculator uses three related sets of formulas: mired shift for filter correction, McCamy’s approximation for CIE xy to correlated color temperature, and a Kelvin to RGB approximation for screen color.

Filter correction formula

Mₛource = 1000000 / Kₛource Mₜarget = 1000000 / Kₜarget Delta_M = Mₜarget - Mₛource K_corrected = 1000000 / (Mₛource + F) Error = abs(F - Delta_M)

CIE xy to CCT formula

n = (x - 0.3320) / (y - 0.1858) CCT = - 449*nÂł + 3525*nÂČ - 6823.3*n + 5520.33

Kelvin to RGB formula

t = K / 100 If t < = 66: R = 255 G = 99.4708025861*ln(t) - 161.1195681661 B = 0, if t < = 19 B = 138.5177312231*ln(t - 10) - 305.0447927307, if t > 19 If t > 66: R = 329.698727446*(t - 60)⁻0.1332047592 G = 288.1221695283*(t - 60)⁻0.0755148492 B = 255
  • K_source: original light source temperature in kelvin.
  • K_target: desired converted light temperature in kelvin.
  • M_source: original source temperature converted to mireds.
  • M_target: target temperature converted to mireds.
  • Delta_M: required mired shift. Positive values are warming corrections, and negative values are cooling corrections.
  • F: mired shift value of a correction filter.
  • K_corrected: estimated output kelvin after applying a filter.
  • x, y: CIE 1931 chromaticity coordinates.
  • CCT: correlated color temperature in kelvin.
  • t: kelvin temperature divided by 100 for the RGB approximation.
  • R, G, B: red, green, and blue channel values, clamped to the 0 to 255 range.

In filter correction mode, the calculator converts the source and target kelvin values to mireds because filter shifts are more consistent in mireds than in kelvin. It then compares the required shift with available filter shifts and ranks the closest matches.

In CIE xy mode, the calculator estimates correlated color temperature from chromaticity coordinates. This works best for points near the blackbody locus.

In Kelvin to RGB mode, the calculator estimates a display color for a given color temperature. The RGB result is an approximation for screens, not a physical light measurement.

Common Color Temperature Reference Values

Use these ranges to check whether a result looks reasonable for the type of light you are matching.

Light source Typical color temperature Typical appearance
Candle or flame 1800 K to 2000 K Very warm amber
Warm household LED 2700 K to 3000 K Warm white
Tungsten studio lamp 3200 K Warm tungsten white
Cool white fluorescent 4000 K to 4500 K Neutral to cool white
Photographic daylight 5600 K Daylight white
D65 daylight 6500 K Slightly cool daylight
Blue sky shade 9000 K to 12000 K Cool blue-white
Correction type Mired shift direction Common use
CTB, color temperature blue Negative shift Cools a warm source, such as 3200 K tungsten toward daylight.
CTO, color temperature orange Positive shift Warms a cool source, such as daylight toward tungsten.
CT Straw Positive shift Warms daylight with a more yellow bias than CTO.
LED or Zircon-style correction Positive or negative shift Fine matching for LED fixtures and mixed LED sources.

Color Temperature Examples

Example 1: Convert tungsten to daylight

You have a 3200 K tungsten source and want to match 5600 K daylight.

Mₛource = 1000000 / 3200 = 312.5 Mₜarget = 1000000 / 5600 = 178.57 Delta_M = 178.57 - 312.5 = - 133.93 mireds

The required shift is about -134 mireds, so you need a cooling correction. A full CTB filter is close because it has a shift near -136.5 mireds.

Example 2: Estimate CCT from CIE xy

Use x = 0.3127 and y = 0.3290, which are close to D65 daylight.

n = (0.3127 - 0.3320) / (0.3290 - 0.1858) n = - 0.13478 CCT = - 449*(- 0.13478)Âł + 3525*(- 0.13478)ÂČ - 6823.3*(- 0.13478) + 5520.33 CCT ≈ 6505 K

The result is about 6500 K, which matches the expected daylight white range.

Color Temperature Calculator FAQ

What is the difference between kelvin and mireds?

Kelvin describes the color temperature directly. Lower kelvin values look warmer, and higher kelvin values look cooler. Mireds are calculated as 1,000,000 divided by kelvin. Filter correction is usually easier in mireds because equal mired shifts represent more consistent visual correction than equal kelvin changes.

Why does a positive mired shift make light warmer?

A positive mired shift increases the mired value. Since mireds are the inverse of kelvin, increasing mireds lowers the kelvin temperature. Lower kelvin values appear warmer, so positive mired shifts are warming corrections. Negative mired shifts raise the kelvin temperature and make the light cooler.

Is the RGB result an exact color?

No. The RGB value is an approximation for displaying a color temperature on a screen. Real light depends on the source spectrum, camera response, white balance, display calibration, and surrounding light. Use the RGB or hex output as a visual guide, not as a precise lighting specification.