smartledz-protocol
Smart LEDZ protocol v1 command and state codec library
Loading...
Searching...
No Matches
color_math.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <array>
9#include <cstdint>
10
11namespace smartledz_protocol {
12namespace v1 {
13
21std::array<uint8_t, 3> lookup_ct_rgb(uint16_t kelvin, float duv);
22
32uint16_t estimate_cct_from_rgb(uint8_t target_red, uint8_t target_green, uint8_t target_blue, float duv);
33
34} // namespace v1
35} // namespace smartledz_protocol
std::array< uint8_t, 3 > lookup_ct_rgb(uint16_t kelvin, float duv)
Converts correlated color temperature and Duv into RGB.
Definition color_math.cpp:50
uint16_t estimate_cct_from_rgb(uint8_t target_red, uint8_t target_green, uint8_t target_blue, float duv)
Estimates correlated color temperature from an RGB sample.
Definition color_math.cpp:101