Skip to main content

Mathf.CorrelatedColorTemperatureToRGB(number Kelvin)

Convert a color temperature in Kelvin to RGB color.

Parameters:

NameTypeDescription
KelvinnumberTemperature in Kelvin. Range 1000 to 40000 Kelvin.

Returns:

typeDescription
ColorCorrelated Color Temperature as floating point RGB color.

Usage

---@type number
local Kelvin;


local val0 = Mathf:CorrelatedColorTemperatureToRGB(Kelvin)

Extra Detail

Given a correlated color temperature (in Kelvin), estimate the RGB equivalent.