Brightness as unsigned integral. Add's the math for conversion to and from Color-Types. Use with: Grayscale Buffers, Dimmed LEDs, Brightness sensors.
More...
#include <modm/ui/color/brightness.hpp>
|
constexpr | BrightnessT (T value) |
|
template<std::unsigned_integral U> |
requires std::is_same_v< T, uint16_t > &&constexpr std::is_same_v< U, uint8_t > | BrightnessT (const BrightnessT< U > &brightness_other) |
|
template<std::unsigned_integral U> |
requires std::is_same_v< T, uint8_t > &&constexpr std::is_same_v< U, uint16_t > | BrightnessT (const BrightnessT< U > &brightness_other) |
|
template<std::unsigned_integral U> |
constexpr | BrightnessT (RgbT< U > rgb) |
|
template<std::unsigned_integral U> |
constexpr | BrightnessT (HsvT< U > hsv) |
|
constexpr | BrightnessT (Rgb565 rgb565) |
|
constexpr bool | operator== (const BrightnessT< T > &other) const = default |
|
template<std::unsigned_integral T>
class modm::color::BrightnessT< T >
Brightness as unsigned integral. Add's the math for conversion to and from Color-Types. Use with: Grayscale Buffers, Dimmed LEDs, Brightness sensors.
- Author
- Thomas Sommer
- Template Parameters
-
T | Unsigned integral for the brightness-value |
template<std::unsigned_integral T>
template<std::unsigned_integral U>
requires std::is_same_v<T, uint16_t>&& constexpr std::is_same_v<U, uint8_t> modm::color::BrightnessT< T >::BrightnessT |
( |
const BrightnessT< U > & |
brightness_other | ) |
|
|
inlineconstexpr |
Copy Constructor 8bit->16bit
template<std::unsigned_integral T>
template<std::unsigned_integral U>
requires std::is_same_v<T, uint8_t>&& constexpr std::is_same_v<U, uint16_t> modm::color::BrightnessT< T >::BrightnessT |
( |
const BrightnessT< U > & |
brightness_other | ) |
|
|
inlineconstexpr |
Copy Constructor 16bit->8bit
template<std::unsigned_integral T>
template<std::unsigned_integral U>
constexpr modm::color::BrightnessT< T >::BrightnessT |
( |
RgbT< U > |
rgb | ) |
|
|
inlineconstexpr |
Convertion Constructor for RGB Color
- Parameters
-
template<std::unsigned_integral T>
template<std::unsigned_integral U>
constexpr modm::color::BrightnessT< T >::BrightnessT |
( |
HsvT< U > |
hsv | ) |
|
|
inlineconstexpr |
Convertion Constructor for HSV Color
- Parameters
-
template<std::unsigned_integral T>
constexpr modm::color::BrightnessT< T >::BrightnessT |
( |
Rgb565 |
rgb565 | ) |
|
|
inlineconstexpr |
Convertion Constructor for RGB565 Color
- Parameters
-
The documentation for this class was generated from the following file: