HEBI C++ API  3.4.0
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 getRed () const
 Returns the red 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 getBlue () const
 Returns the blue channel; value is between 0 and 255. More...
 
uint8_t getAlpha () const
 
void setRed (uint8_t r)
 
void setGreen (uint8_t g)
 
void setBlue (uint8_t b)
 
void setAlpha (uint8_t a)
 

Detailed Description

Structure to describe an RGB color.

Constructor & Destructor Documentation

◆ Color() [1/3]

hebi::Color::Color ( )
inline

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

◆ Color() [2/3]

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.

◆ Color() [3/3]

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.

Member Function Documentation

◆ getRed()

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

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

◆ getGreen()

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

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

◆ getBlue()

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

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

◆ getAlpha()

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.

◆ setRed()

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

◆ setGreen()

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

◆ setBlue()

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

◆ setAlpha()

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

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