modm API documentation
modm::color::Rgb565 Class Reference

#include <modm/ui/color/rgb565.hpp>

Public Typedefs

using RgbCalcType = RgbT< uint8_t >
 

Public Member Functions

constexpr Rgb565 (uint16_t color)
 
constexpr Rgb565 (uint8_t red, uint8_t green, uint8_t blue)
 
template<std::unsigned_integral U>
constexpr Rgb565 (const RgbT< U > &rgb)
 
template<std::unsigned_integral U>
constexpr Rgb565 (const HsvT< U > &hsv)
 
template<std::unsigned_integral U>
constexpr Rgb565 (const BrightnessT< U > brightness)
 
constexpr bool operator== (const Rgb565 &other) const = default
 
Rgb565 operator+ (const Rgb565 other) const
 Saturated addition ⊕.
 
Rgb565 operator- (const Rgb565 other) const
 Saturated substraction ⊖.
 

Public Attributes

uint16_t color {0x0000}
 

Detailed Description

Color in RGB Colorspace, 16 bits: RRRR RGGG GGGB BBBB

Author
Fabian Greif, Thomas Sommer

Constructor & Destructor Documentation

constexpr modm::color::Rgb565::Rgb565 ( uint16_t  color)
inlineconstexpr

Constructor for preformatted Rgb565 Color

Parameters
colorPreformatted RGB-color in 565-format: RRRR RGGG GGGB BBBB
constexpr modm::color::Rgb565::Rgb565 ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
inlineconstexpr

Constructor for components: red, green, blue

Parameters
redRed color component
greenGreen color component
blueBlue color component
template<std::unsigned_integral U>
constexpr modm::color::Rgb565::Rgb565 ( const RgbT< U > &  rgb)
inlineconstexpr

Convertion Constructor for RGB Color

Parameters
rgbRGB Color
template<std::unsigned_integral U>
constexpr modm::color::Rgb565::Rgb565 ( const HsvT< U > &  hsv)
inlineconstexpr

Convertion Constructor for HSV Color

Parameters
hsvHSV Color
template<std::unsigned_integral U>
constexpr modm::color::Rgb565::Rgb565 ( const BrightnessT< U >  brightness)
inlineconstexpr

Convertion Constructor for Brightness

Parameters
brightnessBrightness 'Color'-object

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