Home › Image Tools › Color Temperature to RGB

Color Temperature to RGB

Drag the slider or type a temperature in kelvin to see the matching light color as RGB and HEX. Compare the classic Tanner Helland approximation with a physically based black-body calculation, and jump to presets such as candlelight, warm LED and daylight.

Last updated:

K

1,000 to 40,000 K. Drag the slider or type a value.

Enter your values to see the result.
Advertisement
Advertisement

How to use the Color Temperature to RGB

  1. Set the temperature. Drag the slider or type a value such as 2700 or 6500, or click a preset.
  2. Pick a method. Tanner Helland is the widely used fast approximation; CIE black-body integrates Planck's law with the CIE 1931 observer.
  3. Read the color. The swatch, glow preview and HEX/RGB values update instantly.
  4. Copy the value you need: HEX for web, RGB for apps, normalized values for shaders.
  5. Compare light sources in the table to choose bulbs or set white balance.

Kelvin to RGB formulas

Tanner Helland approximation

With T = K / 100:

  • Red: 255 if T ≤ 66, else 329.698727446 × (T − 60)−0.1332047592
  • Green: 99.4708025861 × ln(T) − 161.1195681661 if T ≤ 66, else 288.1221695283 × (T − 60)−0.0755148492
  • Blue: 255 if T ≥ 66, 0 if T ≤ 19, else 138.5177312231 × ln(T − 10) − 305.0447927307

Each result is clamped to 0-255. The formula is a curve fit to black-body color data, which makes it fast enough for games and lighting apps.

CIE black-body method

Planck's law M(λ, T) = c₁ / (λ⁵ (ec₂/λT − 1)) gives the spectrum of an ideal radiator. Multiplying it by the CIE 1931 2° color matching functions (here the analytic fit by Wyman, Sloan and Shirley, 2013) and summing from 380 to 780 nm gives XYZ, which is converted to linear sRGB, normalized to the brightest channel and gamma encoded.

Color temperature chart

KelvinLight sourceApprox. HEX (Helland)Mired
1,850 KCandle flame#FF8100541
2,700 KIncandescent bulb, warm white LED#FFA757370
3,000 KWarm white LED, halogen#FFB16E333
3,200 KStudio tungsten#FFB87B313
4,000 KNeutral white#FFCEA6250
5,000 KCool white, D50 print viewing#FFE4CE200
5,500 KMidday sun, flash#FFEDDE182
6,500 KDaylight, sRGB white point#FFFEFA154
7,500 KOvercast sky#E6EBFF133
10,000 KClear blue sky#CADAFF100

Frequently asked questions

What RGB color is 2700 K?

With the Tanner Helland approximation 2700 K is about #FFA757 (RGB 255, 167, 87), the orange-white of an incandescent bulb or warm white LED. The CIE black-body method gives a very similar #FFAE59.

What is 6500 K in HEX?

6500 K is close to white with a hint of blue-cyan: about #FFFEFA with the Helland formula. It is near the D65 white point used by sRGB screens, which is why monitors are calibrated to 6500 K.

What is color temperature?

Color temperature describes the color of light by the temperature, in kelvin, of an ideal black body that glows the same color. Low values (1,500-3,000 K) look warm orange, around 4,000-5,000 K looks neutral, and above 6,500 K looks bluish.

Why do the two methods give different results?

Tanner Helland's formula is a curve fit to black-body data rounded for speed. The CIE method computes the light's chromaticity from Planck's law and the CIE 1931 color matching functions, then converts it to sRGB and scales the brightest channel to 255. Differences are usually a few RGB units.

What is a mired?

A mired (micro reciprocal degree) is 1,000,000 divided by the color temperature in kelvin. Lighting gels and white balance shifts are rated in mireds because equal mired steps look like equal color changes. For example, converting 3200 K tungsten to 5600 K daylight needs about −134 mired (a blue CTB gel).

Can a screen show the exact color of a light source?

Only approximately. The values are scaled so the brightest channel is full intensity, so they show hue but not brightness. Very low temperatures, below about 1,900 K, are slightly outside the sRGB gamut and are clipped.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

RGB to HSLConvert RGB values to HSL, HSV and HWB with a live swatch and copy-ready CSS.HEX to RGBConvert HEX colors to RGB and other formats.Ring LightTurn your screen into a ring light or fill light with adjustable color temperature.Color PickerPick any color and get HEX, RGB, HSL, HSV and CMYK codes, shades and a screen eyedropper.Color Code ConverterConvert a color between HEX, RGB, HSL, HSV, CMYK, LAB, LCH and OKLCH with a live swatch.White Balance CorrectorFix color casts: click a neutral gray point or use auto gray world, then fine-tune temperature and tint.Color Palette GeneratorGenerate beautiful color palettes and export them.RGB to HEXConvert RGB to HEX with sliders, live swatch and one-click copy.HEX to HSLConvert HEX colors to HSL and back with interactive sliders.RGB to CMYK ConverterConvert RGB and HEX colors to CMYK for print, and back.Color Contrast CheckerCheck WCAG contrast ratios and find accessible text colors.Pantone to HEXLook up approximate HEX, RGB and CMYK values for Pantone colors.Color Name FinderFind the closest color name for any HEX or RGB color.Color Blindness SimulatorSee any image as people with protanopia, deuteranopia, tritanopia or achromatopsia see itImage Color PickerPick any pixel colour from an image and get HEX, RGB, HSL plus a paletteColor Shades GeneratorTurn one HEX color into a 50-950 scale plus tints, shades and tones, ready to export.Tailwind Color GeneratorTurn one color into a full Tailwind 50–950 shade scale and export the config or CSS.Color MixerMix two colors in sRGB, linear, OKLab or OKLCH, or blend them with Photoshop-style modes.Random Color GeneratorGenerate random HEX colors one at a time or in batches, with hue, saturation and lightness ranges.Color WheelFind complementary, triadic, analogous and other color harmonies on an interactive wheel.HTML Color CodesAll 140 HTML color names with HEX and RGB codes, plus the 216 web-safe colors. Click to copy.Color Palette from ImageExtract the main colors of any photo as HEX codes, CSS variables and a palette PNG.Replace Color in ImageClick a color in a picture and swap it for a new color or transparency, keeping the shading.CMYK to RGBConvert CMYK percentages to RGB and HEX color codes with sliders and a live preview.HSL to HEXConvert HSL and HSLA colors to HEX and RGB with sliders and a live preview.HEX to RGBAConvert HEX color codes to CSS rgba() with an opacity slider and one-click copy.RGBA to HEXConvert rgba() colors to 8-digit HEX, or flatten transparency onto any background.HEX to CMYKConvert HEX color codes to CMYK percentages for print, with a live preview.HEX to PantoneFind the 5 closest Pantone-style solid coated colors for any HEX or RGB, ranked by Delta E.OKLCH Color ConverterConvert HEX, RGB and HSL to OKLCH, OKLab, Lab and LCH with sRGB and P3 gamut checks.RAL to HEXLook up RAL Classic codes as HEX, RGB and CMYK, search by name or find the nearest RAL.Room Paint Color VisualizerUpload a room photo, select the walls and preview any paint color or HEX with real lighting.Photo to Pop ArtMake Warhol-style pop art from a photo: posterized color tiles in 1, 4 or 9 grids with custom palettes.Screen Color PickerPick any pixel color from anywhere on your screen and copy it as HEX, RGB or HSL.Solid Color Image GeneratorMake a plain single-color or transparent image in any size, like 1920x1080, as PNG or JPG.CMYK to HEXConvert CMYK percentages to a HEX color code and RGB, with a live swatch and shades.Photo Color MatchCopy the color grading of a reference photo onto your image (Reinhard color transfer).Underwater Photo Color CorrectionRestore lost reds and remove the blue or green cast from underwater photos by depth.
See all 38 Color Tools →