ESPHome
2024.9.2
esphome
esphome
components
light
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
),
30
saturation
(
saturation
),
31
value
(
value
) {}
32
Color
to_rgb
()
const
;
33
};
34
35
}
// namespace light
36
}
// namespace esphome
esphome::light::ESPHSVColor::ESPHSVColor
ESPHSVColor(uint8_t hue, uint8_t saturation, uint8_t value) ESPHOME_ALWAYS_INLINE
Definition:
esp_hsv_color.h:29
esphome::light::ESPHSVColor::s
uint8_t s
Definition:
esp_hsv_color.h:18
esphome::light::ESPHSVColor::value
uint8_t value
Definition:
esp_hsv_color.h:21
esphome::light::ESPHSVColor::raw
uint8_t raw[3]
Definition:
esp_hsv_color.h:25
esphome::light::ESPHSVColor
Definition:
esp_hsv_color.h:9
esphome::light::ESPHSVColor::v
uint8_t v
Definition:
esp_hsv_color.h:22
esphome::light::ESPHSVColor::h
uint8_t h
Definition:
esp_hsv_color.h:14
esphome::Color
Definition:
color.h:10
color.h
esphome::light::ESPHSVColor::saturation
uint8_t saturation
Definition:
esp_hsv_color.h:17
esphome::light::ESPHSVColor::hue
uint8_t hue
Definition:
esp_hsv_color.h:13
esphome::light::ESPHSVColor::ESPHSVColor
ESPHSVColor() ESPHOME_ALWAYS_INLINE
Definition:
esp_hsv_color.h:27
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
helpers.h
esphome::light::ESPHSVColor::to_rgb
Color to_rgb() const
Definition:
esp_hsv_color.cpp:6
Generated by
1.8.13