ForHosting KIT · Images

Color temperature to RGB

Type the Kelvin value of a light and see its color: 6500 K, noon daylight, comes out as 255, 254 and 250, or #fffefa. Readings outside 1000 to 40000 K are refused instead of quietly clamped. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Creativity
6,500
You get
Kelvin
6,500
Resistance (Ω)
255
G
254
B
250

This color temperature to RGB converter turns a single Kelvin value into an approximate sRGB colour for lighting design, photography white-balance previews, and UI theming. Enter a finite temperature between one thousand and forty thousand Kelvin; the engine returns red, green, and blue channel integers from zero to two hundred fifty-five, a three-element rgb array, and a lowercase hex string. The mapping uses the well-known Tanner Helland blackbody curve fit, a deterministic piecewise power-and-log approximation of Planckian-locus colour that many photographic tools share. Familiar checkpoints include candlelight near one thousand eight hundred Kelvin, studio tungsten near three thousand two hundred Kelvin, and noon daylight near six thousand five hundred Kelvin. The path is pure arithmetic with no network calls, no sampling, and no date-dependent shortcuts.

How the Kelvin field is read and how RGB stays reproducible

Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a silent wrong swatch. The inclusive bounds are one thousand and forty thousand Kelvin, matching the classical domain of the Tanner Helland fit used in many open photographic utilities.

Computation sets temp equal to Kelvin divided by one hundred, then applies piecewise formulas: red is fixed at two hundred fifty-five for cooler temps and a power law above sixty-six hundred on the scaled scale; green uses a natural log below that breakpoint and a power law above it; blue is zero below roughly nineteen hundred Kelvin on the scaled scale, two hundred fifty-five above sixty-six hundred, and a log fit in between. Each channel is clamped and rounded to an integer byte.

Where Kelvin-to-RGB fits in design, photography, and software

Designers meet color temperature when a brand guideline names a warm practical at two thousand seven hundred Kelvin, when a stage plot lists LEDs by CCT, or when a product mock needs a light that reads candle versus daylight. Photographers and video editors use the same numbers when previewing white-balance offsets or building LUT documentation that must show a consistent swatch for a stated Kelvin value.

Teachers and students can check homework that asks what RGB approximates a blackbody at a given temperature without trusting opaque calculator apps that silently clamp out-of-range inputs or switch gamma without saying so. Developers call the same contract from scripts to seed deterministic test vectors for theme generators, to normalize lighting metadata before a render, or to satisfy programming-challenge statements that demand three channels rather than a hand-waved warm or cool label.

Lighting and mood-board previews

Map stated Kelvin values (candle, tungsten, daylight, overcast) to RGB/hex swatches for decks, set plots, and brand guidelines.

Photography and video tooling

Preview approximate white-balance colours from camera or lighting CCT metadata without a full spectral renderer.

What does the color temperature to RGB converter cost?

It is free in your browser on this page.

Which algorithm is used?

The Tanner Helland blackbody curve fit: Kelvin is scaled by 1/100, then piecewise power and log formulas produce R, G, and B, each clamped to 0–255.

Is this exact CIE chromaticity or camera white balance?

No. It is a widely used approximate mapping suitable for UI swatches and lighting previews, not a full spectral or ICC pipeline.

What does 6500 K return?

A near-white daylight swatch under the Tanner Helland fit (high R, G, and B channels). Run the calculator for the exact byte values and hex string.

What color is candlelight in RGB?

Enter 1800 K, the usual figure for candlelight, and you get a deep amber with its red, green and blue values and hex code. Lower Kelvin values look warmer, higher values look bluer.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/color/temperature

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/color/temperature \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"temperature":6500}'
{
  "temperature": 6500
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "color.temperature",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

min_kelvin1000
max_kelvin40000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Values outside the supported range are rejected with invalid_input rather than silently clamped, so a bad sensor reading never becomes a wrong swatch.

What color temperature means and what the response contains

Color temperature describes the hue of a light source by comparing it to an ideal blackbody radiator heated to a stated temperature in Kelvin. Lower Kelvin values look warm and amber; higher values look cool and bluish; mid-range daylight values sit near white. Photographers, cinematographers, and lighting designers use those numbers when matching practicals, gels, and white-balance settings, and product designers often need a quick swatch that matches a named CCT without running a full spectral simulation. This calculator accepts one temperature field and returns the normalized temperature and kelvin echo, integer channels r, g, and b in the closed zero-to-two-hundred-fifty-five range, an rgb array of those three bytes, a lowercase hex colour string suitable for CSS, the method tag tanner_helland, a short formula reminder, and the inclusive min-max range the engine enforces. There is no camera matrix, no chromatic adaptation transform beyond the published curve fit, and no random sampling of spectra: the engine either builds a stable three-channel approximation inside the documented band or rejects the input with invalid_input. Rejected cases include a missing temperature, non-finite values, non-decimal strings, and any Kelvin figure below one thousand or above forty thousand.

How the Kelvin field is read and how RGB stays reproducible

The preferred field is temperature, but aliases kelvin, K, temp, and cct are accepted so spreadsheets, query strings, camera metadata dumps, and typed forms can reuse the same contract without renaming columns. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the curve fit yourself.

Where Kelvin-to-RGB fits in design, photography, and software

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a mood-board demo to an automated pipeline without changing the mathematical result. Pair it with RGB-to-hex or contrast checkers when you need related colour steps, and with other color endpoints when you are building a small lab of free, deterministic colour helpers.

Deterministic test fixtures

Generate reproducible r, g, b, and hex strings for unit tests, theme generators, and CI assertions on CCT-driven UI.

What Kelvin range is supported?

Inclusive 1000 to 40000 Kelvin. Values outside that band are rejected with invalid_input rather than clamped.

Read the full KIT documentation →