The class stores color represent by red, green and blue component. It allows to count the brightness according to the biggest RGB component.
More...
#include <ColorBrightness.h>
|
| ColorBrightness (const uint8_t red, const uint8_t green, const uint8_t blue, const uint8_t maxColorElement=0xff) |
|
uint8_t | brightness () const |
| Returns brightness in percents.
|
|
void | setBrightness (const uint8_t brightness) |
|
uint8_t | red () const |
|
uint8_t | green () const |
|
uint8_t | blue () const |
|
void | setColor (const uint8_t red, const uint8_t green, const uint8_t blue) |
|
The class stores color represent by red, green and blue component. It allows to count the brightness according to the biggest RGB component.
ColorBrightness::ColorBrightness |
( |
const uint8_t |
red, |
|
|
const uint8_t |
green, |
|
|
const uint8_t |
blue, |
|
|
const uint8_t |
maxColorElement = 0xff |
|
) |
| |
- Parameters
-
maxColorElement | maximum allowed value of RGB component |
void ColorBrightness::setBrightness |
( |
const uint8_t |
brightness | ) |
|
- Parameters
-
- Exceptions
-
IllegalStateException | in case of the brightness is bigger then 100 |
void ColorBrightness::setColor |
( |
const uint8_t |
red, |
|
|
const uint8_t |
green, |
|
|
const uint8_t |
blue |
|
) |
| |
- Exceptions
-
IllegalStateException | in case of some component is bigger than max color element |
The documentation for this class was generated from the following files:
- /var/lib/jenkins/workspace/beeeon-gateway-master/src/util/ColorBrightness.h
- /var/lib/jenkins/workspace/beeeon-gateway-master/src/util/ColorBrightness.cpp