Color in RGB.
More...
#include <hueplusplus/ColorUnits.h>
|
uint8_t | r |
| Red amount from 0 to 255. More...
|
|
uint8_t | g |
| Green amount from 0 to 255. More...
|
|
uint8_t | b |
| Blue amount from 0 to 255. More...
|
|
◆ fromXY() [1/2]
Create from XYBrightness.
Performs gamma correction so the light color matches the screen color better.
- Note
- The conversion formula is not exact, it can be off by up to 9 for each channel. This is because the color luminosity is not saved.
◆ fromXY() [2/2]
Create from XYBrightness and clip to gamut
.
A light may have XY set out of its range. Then this function returns the actual color the light shows rather than what it is set to. Performs gamma correction so the light color matches the screen color better.
- Note
- The conversion formula is not exact, it can be off by up to 9 for each channel. This is because the color luminosity is not saved.
◆ operator!=()
bool hueplusplus::RGB::operator!= |
( |
const RGB & |
other | ) |
const |
|
inline |
◆ operator==()
bool hueplusplus::RGB::operator== |
( |
const RGB & |
other | ) |
const |
|
inline |
◆ toHueSaturation()
Convert to HueSaturation.
To get the correct color, set brightness to max(r,g,b).
◆ toXY() [1/2]
Convert to XYBrightness without clamping.
Performs gamma correction so the light color matches the screen color better.
◆ toXY() [2/2]
Convert to XYBrightness and clip to gamut
.
Performs gamma correction so the light color matches the screen color better.
uint8_t hueplusplus::RGB::b |
Blue amount from 0 to 255.
uint8_t hueplusplus::RGB::g |
Green amount from 0 to 255.
uint8_t hueplusplus::RGB::r |
Red amount from 0 to 255.
The documentation for this struct was generated from the following files: