struct mrpt::img::TColor¶
A RGB color - 8bit.
Struct pack=1 is ensured.
#include <mrpt/img/TColor.h> struct TColor { // fields uint8_t R {0}; uint8_t G {0}; // construction TColor(); TColor( uint8_t r, uint8_t g, uint8_t b, uint8_t alpha = 255 ); TColor(const unsigned int color_RGB_24bit); TColor( const unsigned int color_RGB_24bit, const uint8_t alpha ); TColor(const TColor& other); // methods operator unsigned int () const; TColor& operator = (const TColor& other); TColor& operator += (const TColor& other); TColor& operator -= (const TColor& other); static constexpr TColor red(); static constexpr TColor green(); static constexpr TColor blue(); static constexpr TColor black(); static constexpr TColor white(); static constexpr TColor gray(); };
Methods¶
operator unsigned int () const
Operator for implicit conversion into an int binary representation 0xRRGGBB.
static constexpr TColor red()
Predefined colors.