Motion
Get Motion

ReferenceScripting APIMotionColourfromKelvin

MotionColour.fromKelvin

method

The colour of light at a temperature.

NamefromKelvin
Kindmethod of MotionColour
Called ascolour.fromKelvin(…)
Since0.4

Syntax

fromKelvin(kelvin: number): string

Parameters

NameTypeDescription
kelvinnumber1000 (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));