nRF Connect SDK API 2.8.99
|
uint16_t bt_mesh_light_hsl_to_rgb | ( | const struct bt_mesh_light_hsl * | hsl, |
enum bt_mesh_rgb_ch | ch ) |
#include <include/bluetooth/mesh/light_hsl.h>
Convert HSL to a 16 bit RGB channel value.
Uses the standard conversion formula to convert HSL to RGB, as described in https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB. Note that the accuracy of the conversion depends on the characteristics of the light source hardware, and may need correction for each channel.
[in] | hsl | HSL value. |
[in] | ch | RGB color channel. |