Api > Mathf > CorrelatedColorTemperatureToRGB()
Mathf.CorrelatedColorTemperatureToRGB(number Kelvin)⚓︎
Convert a color temperature in Kelvin to RGB color.
Parameters:⚓︎
Name | Type | Description |
---|---|---|
Kelvin | number | Temperature in Kelvin. Range 1000 to 40000 Kelvin. |
Returns:⚓︎
type | Description |
---|---|
Color | Correlated 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.