23 #ifndef INCLUDE_HUEPLUSPLUS_UNITS_H 24 #define INCLUDE_HUEPLUSPLUS_UNITS_H 54 bool operator==(
const XY& other)
const {
return x == other.
x && y == other.
y; }
55 bool operator!=(
const XY& other)
const {
return !(*
this == other); }
87 bool contains(
const XY& xy)
const;
90 XY corrected(
const XY& xy)
const;
118 bool operator==(
const RGB& other)
const {
return r == other.
r && g == other.
g && b == other.
b; }
bool operator!=(const XYBrightness &other) const
Definition: ColorUnits.h:70
bool operator!=(const HueSaturation &other) const
Definition: ColorUnits.h:43
Color in RGB.
Definition: ColorUnits.h:109
Namespace for the hueplusplus library.
Definition: Action.h:27
constexpr ColorGamut maxGamut
Maximal gamut to be used when unknown.
Definition: ColorUnits.h:105
bool operator!=(const XY &other) const
Definition: ColorUnits.h:55
float y
y coordinate in CIE, 0 to 1
Definition: ColorUnits.h:52
uint8_t r
Red amount from 0 to 255.
Definition: ColorUnits.h:112
bool operator==(const RGB &other) const
Definition: ColorUnits.h:118
bool operator==(const XY &other) const
Definition: ColorUnits.h:54
unsigned int miredToKelvin(unsigned int mired)
Const function that converts Mired to Kelvin.
Definition: ColorUnits.cpp:243
int hue
Color hue.
Definition: ColorUnits.h:36
int saturation
Color saturation.
Definition: ColorUnits.h:40
constexpr ColorGamut gamutC
Gamut C, used by newer Extended Color Lights.
Definition: ColorUnits.h:101
uint8_t b
Blue amount from 0 to 255.
Definition: ColorUnits.h:116
bool operator==(const XYBrightness &other) const
Definition: ColorUnits.h:69
Color and brightness in CIE.
Definition: ColorUnits.h:62
XY blueCorner
Blue corner in the color triangle.
Definition: ColorUnits.h:84
XY redCorner
Red corner in the color triangle.
Definition: ColorUnits.h:80
uint8_t g
Green amount from 0 to 255.
Definition: ColorUnits.h:114
bool operator!=(const RGB &other) const
Definition: ColorUnits.h:119
XY greenCorner
Green corner in the color triangle.
Definition: ColorUnits.h:82
Color in CIE x and y coordinates.
Definition: ColorUnits.h:47
float brightness
Brightness from 0 to 1.
Definition: ColorUnits.h:67
Triangle of representable colors in CIE.
Definition: ColorUnits.h:77
bool operator==(const HueSaturation &other) const
Definition: ColorUnits.h:42
XY xy
XY color.
Definition: ColorUnits.h:65
constexpr ColorGamut gamutA
Gamut A, used by most Color Lights.
Definition: ColorUnits.h:97
Color in hue and saturation.
Definition: ColorUnits.h:31
unsigned int kelvinToMired(unsigned int kelvin)
Const function that converts Kelvin to Mired.
Definition: ColorUnits.cpp:238
float x
x coordinate in CIE, 0 to 1
Definition: ColorUnits.h:50
constexpr ColorGamut gamutB
Gamut B, used by older Extended Color Lights.
Definition: ColorUnits.h:99