Skip to content

Class: KelvinUtil

Temperature Color Converter

Constructors

Methods

Constructors

constructor

new KelvinUtil(): KelvinUtil

Returns

KelvinUtil

Methods

color_temperature_to_rgb

color_temperature_to_rgb(color_temperature_Kelvin): Color

Convert color temperature to color object

Parameters

NameTypeDescription
color_temperature_KelvinnumberColor temperature value

Returns

Color

Defined in

src/util/KelvinUtil.ts:13


get_red

get_red(temperature): number

Return red component [0-255]

Parameters

NameType
temperaturenumber

Returns

number

Defined in

src/util/KelvinUtil.ts:32


get_green

get_green(temperature): number

Return green component [0-255]

Parameters

NameType
temperaturenumber

Returns

number

Defined in

src/util/KelvinUtil.ts:42


get_blue

get_blue(temperature): number

Return blue component [0-255]

Parameters

NameType
temperaturenumber

Returns

number

Defined in

src/util/KelvinUtil.ts:56