ReferenceScripting APIMotionColourfromKelvin
MotionColour.fromKelvin
methodThe colour of light at a temperature.
| Name | fromKelvin |
|---|---|
| Kind | method of MotionColour |
| Called as | colour.fromKelvin(…) |
| Since | 0.4 |
Syntax
fromKelvin(kelvin: number): stringParameters
| Name | Type | Description |
|---|---|---|
kelvin | number | 1000 (a candle) to 40000 (blue sky); 6500 daylight |
Returns
string: the colour.
Example
const sky = scene.colour.fromKelvin(scene.lerp(2000, 6500, scene.clock.daylight));Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.