getTempRgb(kelvin: number)

Requires:
≥1.15.0

Description

Compute an RGB hex color string for the UI based on color temperature (Kelvin), commonly used for the color bar in temperature sliders.

Parameters

ParameterTypeRequiredDescription
kelvinnumberYesColor temperature in Kelvin (not the 0–1000 temp_value)

Return Value

Type: string
Hex color, e.g., #ffa500

Examples

Example

import { createMatterKit } from '@ray-js/panel-sdk';

const matterKit = createMatterKit();
const hex = matterKit.utils.getTempRgb(370);