modm API documentation
modm::color::BrightnessT< T > Class Template Reference

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>

Public Member Functions

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
 

Public Attributes

value {0}
 

Detailed Description

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
TUnsigned integral for the brightness-value

Constructor & Destructor Documentation

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
rgbRGB Color
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
hsvHSV Color
template<std::unsigned_integral T>
constexpr modm::color::BrightnessT< T >::BrightnessT ( Rgb565  rgb565)
inlineconstexpr

Convertion Constructor for RGB565 Color

Parameters
rgb565RGB565 Color

The documentation for this class was generated from the following file: