Color Temperature Preview
Convert a Kelvin value to an approximate RGB/HEX preview color.
How to use
- Adjust Kelvin and inspect the preview and CSS color.
Capabilities and scope
kelvinToHex uses an approximation to render the selected color temperature on an sRGB display.
How it works
The Kelvin number is passed through an approximate RGB function and clamped to HEX.
Example
Around 6500K appears close to a neutral daylight-like screen color.
Useful for
- Compare the rough visual impression of lighting color temperatures
Before you use it
- Real spectral power distribution, CRI, and display calibration are not modeled.
Frequently asked questions
Will it exactly match a real lamp?
No. It is an approximate Kelvin-to-sRGB preview.