ESPHome  2024.9.2
esp_hsv_color.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "esphome/core/helpers.h"
4 #include "esphome/core/color.h"
5 
6 namespace esphome {
7 namespace light {
8 
9 struct ESPHSVColor {
10  union {
11  struct {
12  union {
13  uint8_t hue;
14  uint8_t h;
15  };
16  union {
17  uint8_t saturation;
18  uint8_t s;
19  };
20  union {
21  uint8_t value;
22  uint8_t v;
23  };
24  };
25  uint8_t raw[3];
26  };
27  inline ESPHSVColor() ESPHOME_ALWAYS_INLINE : h(0), s(0), v(0) { // NOLINT
28  }
29  inline ESPHSVColor(uint8_t hue, uint8_t saturation, uint8_t value) ESPHOME_ALWAYS_INLINE : hue(hue),
31  value(value) {}
32  Color to_rgb() const;
33 };
34 
35 } // namespace light
36 } // namespace esphome
ESPHSVColor(uint8_t hue, uint8_t saturation, uint8_t value) ESPHOME_ALWAYS_INLINE
Definition: esp_hsv_color.h:29
ESPHSVColor() ESPHOME_ALWAYS_INLINE
Definition: esp_hsv_color.h:27
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7