---
name: "getTempRgb"
mode: "api"
versionRequirements:
  - { name: "", version: "1.15.0" }
title: "getTempRgb"
summary: "Hex RGB string for a Kelvin color temperature (e.g. slider tint)."
questions:
  - "What UI pattern is getTempRgb commonly used for?"
  - "Is the input Kelvin or 0–1000 temp_value?"
---

## getTempRgb

> [VERSION] v1.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

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `kelvin` | `number` | Yes | Color temperature in Kelvin (not the 0–1000 temp_value) |

### Return Value

None


### Examples

#### Example

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

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