ESPHome 2025.12.1
Loading...
Searching...
No Matches
esp_hsv_color.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome::light {
7
8struct ESPHSVColor {
9 union {
10 struct {
11 union {
12 uint8_t hue;
13 uint8_t h;
14 };
15 union {
16 uint8_t saturation;
17 uint8_t s;
18 };
19 union {
20 uint8_t value;
21 uint8_t v;
22 };
23 };
24 uint8_t raw[3];
25 };
26 inline ESPHSVColor() ESPHOME_ALWAYS_INLINE : h(0), s(0), v(0) { // NOLINT
27 }
28 inline ESPHSVColor(uint8_t hue, uint8_t saturation, uint8_t value) ESPHOME_ALWAYS_INLINE : hue(hue),
30 value(value) {}
31 Color to_rgb() const;
32};
33
34} // namespace esphome::light
ESPHSVColor() ESPHOME_ALWAYS_INLINE
ESPHSVColor(uint8_t hue, uint8_t saturation, uint8_t value) ESPHOME_ALWAYS_INLINE