Public Member Functions | Private Attributes | List of all members
hebi::Color Struct Reference

Structure to describe an RGB color. More...

#include <color.hpp>

Public Member Functions

 Color ()
 Creates a color object with zero for the red, green, blue, and alpha channels. More...
 
 Color (uint8_t r, uint8_t g, uint8_t b, uint8_t a)
 Creates a color from the given red, green, blue, and alpha channel values. More...
 
 Color (uint8_t r, uint8_t g, uint8_t b)
 Creates a color from the given red, green, and blue values. More...
 
uint8_t getAlpha () const
 
uint8_t getBlue () const
 Returns the blue channel; value is between 0 and 255. More...
 
uint8_t getGreen () const
 Returns the green channel; value is between 0 and 255. More...
 
uint8_t getRed () const
 Returns the red channel; value is between 0 and 255. More...
 
void setAlpha (uint8_t a)
 
void setBlue (uint8_t b)
 
void setGreen (uint8_t g)
 
void setRed (uint8_t r)
 

Private Attributes

uint8_t a_ {}
 
uint8_t b_ {}
 
uint8_t g_ {}
 
uint8_t r_ {}
 

Detailed Description

Structure to describe an RGB color.

Definition at line 8 of file color.hpp.

Constructor & Destructor Documentation

hebi::Color::Color ( )
inline

Creates a color object with zero for the red, green, blue, and alpha channels.

Definition at line 12 of file color.hpp.

hebi::Color::Color ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a 
)
inline

Creates a color from the given red, green, blue, and alpha channel values.

Each parameter should be between 0 and 255.

Definition at line 19 of file color.hpp.

hebi::Color::Color ( uint8_t  r,
uint8_t  g,
uint8_t  b 
)
inline

Creates a color from the given red, green, and blue values.

This sets the alpha channel to "255". Each parameter should be between 0 and 255.

Definition at line 26 of file color.hpp.

Member Function Documentation

uint8_t hebi::Color::getAlpha ( ) const
inline

Returns the alpha channel; value is between 0 and 255. '0' indicates the module has control over this color, and any other value indicates that there is a command overriding this channel. For feedback/info values, this value should currently be ignored.

Definition at line 39 of file color.hpp.

uint8_t hebi::Color::getBlue ( ) const
inline

Returns the blue channel; value is between 0 and 255.

Definition at line 34 of file color.hpp.

uint8_t hebi::Color::getGreen ( ) const
inline

Returns the green channel; value is between 0 and 255.

Definition at line 32 of file color.hpp.

uint8_t hebi::Color::getRed ( ) const
inline

Returns the red channel; value is between 0 and 255.

Definition at line 30 of file color.hpp.

void hebi::Color::setAlpha ( uint8_t  a)
inline

Definition at line 44 of file color.hpp.

void hebi::Color::setBlue ( uint8_t  b)
inline

Definition at line 43 of file color.hpp.

void hebi::Color::setGreen ( uint8_t  g)
inline

Definition at line 42 of file color.hpp.

void hebi::Color::setRed ( uint8_t  r)
inline

Definition at line 41 of file color.hpp.

Member Data Documentation

uint8_t hebi::Color::a_ {}
private

Definition at line 50 of file color.hpp.

uint8_t hebi::Color::b_ {}
private

Definition at line 49 of file color.hpp.

uint8_t hebi::Color::g_ {}
private

Definition at line 48 of file color.hpp.

uint8_t hebi::Color::r_ {}
private

Definition at line 47 of file color.hpp.


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


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:10:59