Back to Convert
Color temperature (Kelvin) ↔ RGB / mired converter

Color temperature (Kelvin) ↔ RGB / mired converter

Convert a color temperature (Kelvin, 1000K–40000K) into RGB / HEX / mired and inspect how a light source would render — ideal for white-balance, white-point, or interior-lighting workflows. Powered by Tanner Helland's sRGB approximation, with one-click presets for candlelight (1500K), tungsten (2700K), warm fluorescent (3000K), daylight 5000K, standard D65 (6500K), overcast (8000K), and blue sky (10000K). Mired (1,000,000 / K) and a coarse reverse lookup from RGB are also provided. Nothing leaves your browser.

conversioncolor

How to use

Enter a Kelvin value and the tool renders an sRGB approximation (HEX + RGB) and the mired (M) equivalent. Drag the slider through 1000K–40000K or click a preset (Candle 1500K / Tungsten 2700K / Warm fluorescent 3000K / Daylight 5000K / D65 6500K / Overcast 8000K / Blue sky 10000K). The reverse direction takes a HEX or RGB sample and returns the closest matching color temperature (approximate). Real-world light is non-blackbody, so treat the output as a white-balance / mockup reference rather than a precise color match.

FAQ

Which formula is used?
Tanner Helland's blackbody fit (http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/). It's the standard fast, browser-friendly approximation that works across 1000K–40000K in sRGB.
What is mired?
Reciprocal megakelvin — 1,000,000 / K. Photo filter packs (CTO / CTB) and white-balance offsets are usually specified in mired because the differences map linearly to perceived color shift. 5000K = 200M; 6500K ≈ 154M; 3000K ≈ 333M.
Why does the on-screen color sometimes look different from the real light?
Real light sources (LEDs, tungsten, fluorescent) aren't ideal blackbodies — their CRI and green/magenta tints aren't captured by this approximation. For pro work, measure with a color meter.
Is the reverse (RGB → Kelvin) lookup accurate?
Approximate. The forward curve isn't bijective so multiple HEX values can map to similar Kelvin temperatures. The tool sweeps the whole range at a 5 K granularity and reports the closest match — fine for ballpark white-balance work, not for tight color matching.
What range does it cover?
1000K (warm, near candlelight) to 40000K (extreme blue sky / UV-leaning). Values outside the range are clamped. Photographic and interior work usually lives between 2000K and 10000K.
Is my input sent anywhere?
No. All conversions run in browser JavaScript; inputs and outputs never leave the page.

Related tools