Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::RGBWord8_t Struct Reference

Red, Green and Blue 8 bit values. More...

Collaboration diagram for Burger::RGBWord8_t:

Public Member Functions

uint32_t ToRGB (void) const
 Convert the color to an RGB 32 bit integer.
 
uint32_t ToBGR (void) const
 Convert the color to a BGR 32 bit integer.
 
void FromRGB (uint32_t uColor)
 Initialize the color with a 32 bit integer.
 
void FromBGR (uint32_t uColor)
 Initialize the color with a 32 bit integer.
 
void Interpolate (const RGBWord8_t *pFrom, const RGBWord8_t *pTo, float fFactor)
 Interpolates between two colors.
 

Public Attributes

uint8_t m_uRed
 8 bit red value
 
uint8_t m_uGreen
 8 bit green value
 
uint8_t m_uBlue
 8 bit blue value
 

Static Public Attributes

static const RGBWord8_t Aqua = {0,255,255}
 
static const RGBWord8_t Black = {0,0,0}
 
static const RGBWord8_t Blue = {0,0,255}
 
static const RGBWord8_t Fuchsia = {255,0,255}
 
static const RGBWord8_t Gray = {128,128,128}
 
static const RGBWord8_t Green = {0,128,0}
 
static const RGBWord8_t Lime = {0,255,0}
 
static const RGBWord8_t Maroon = {128,0,0}
 
static const RGBWord8_t Navy = {0,0,128}
 
static const RGBWord8_t Olive = {128,128,0}
 
static const RGBWord8_t Orange = {255,165,0}
 
static const RGBWord8_t Purple = {128,0,128}
 
static const RGBWord8_t Red = {255,0,0}
 
static const RGBWord8_t Silver = {192,192,192}
 
static const RGBWord8_t Teal = {0,128,128}
 
static const RGBWord8_t White = {255,255,255}
 
static const RGBWord8_t Yellow = {255,255,0}
 

Detailed Description

Red, Green and Blue 8 bit values.


Three byte structure that contains the red, green and blue (in that order) color components where the value of 0 mean absence of color and 255 is the maximum color

See also
Burger::RGBAWord8_t, Burger::RGBWord16_t and Burger::RGBFloat_t

Member Function Documentation

◆ FromBGR()

void Burger::RGBWord8_t::FromBGR ( uint32_t uColor)
inline

Initialize the color with a 32 bit integer.


Convert the color from a 32 bit integer whereas B<<16+G<<8+R and store the Red, Green and Blue components

Parameters
uColor32 bit color value that is formatted as B<<16+G<<8+R
See also
ToBGR(void) const or FromRGB(uint32_t)

◆ FromRGB()

void Burger::RGBWord8_t::FromRGB ( uint32_t uColor)
inline

Initialize the color with a 32 bit integer.


Convert the color from a 32 bit integer whereas R<<16+G<<8+B and store the Red, Green and Blue components

Parameters
uColor32 bit color value that is formatted as R<<16+G<<8+B
See also
ToRGB(void) const or FromBGR(uint32_t)

◆ Interpolate()

void BURGER_API Burger::RGBWord8_t::Interpolate ( const RGBWord8_t * pFrom,
const RGBWord8_t * pTo,
float fFactor )

Interpolates between two colors.


Interpolate with linear scaling between two colors. 0.0f will return the From color and 1.0f will return the To color and all factors in between will yield the proper mix of the two colors.

Parameters
pFromPointer to color convert from
pToPointer to color to convert o
fFactorInterpolation factor between 0.0f to 1.0f (0.0f = pFrom, 1.0f = pTo)

◆ ToBGR()

uint32_t Burger::RGBWord8_t::ToBGR ( void ) const
inline

Convert the color to a BGR 32 bit integer.


Convert the color into a 32 bit integer whereas B<<16+G<<8+R

Returns
A 32 bit integer in native endian with the color in the lower 24 bits
See also
FromBGR(uint32_t) or ToRGB(void) const

◆ ToRGB()

uint32_t Burger::RGBWord8_t::ToRGB ( void ) const
inline

Convert the color to an RGB 32 bit integer.


Convert the color into a 32 bit integer whereas R<<16+G<<8+B

Returns
A 32 bit integer in native endian with the color in the lower 24 bits
See also
FromRGB(uint32_t) or ToBGR(void) const

Member Data Documentation

◆ Aqua

const Burger::RGBWord8_t Burger::RGBWord8_t::Aqua = {0,255,255}
static

RGB 0,255,255 : 

◆ Black

const Burger::RGBWord8_t Burger::RGBWord8_t::Black = {0,0,0}
static

RGB 0,0,0 : 

◆ Blue

const Burger::RGBWord8_t Burger::RGBWord8_t::Blue = {0,0,255}
static

RGB 0,0,255 : 

◆ Fuchsia

const Burger::RGBWord8_t Burger::RGBWord8_t::Fuchsia = {255,0,255}
static

RGB 255,0,255 : 

◆ Gray

const Burger::RGBWord8_t Burger::RGBWord8_t::Gray = {128,128,128}
static

RGB 128,128,128 : 

◆ Green

const Burger::RGBWord8_t Burger::RGBWord8_t::Green = {0,128,0}
static

RGB 0,128,0 : 

◆ Lime

const Burger::RGBWord8_t Burger::RGBWord8_t::Lime = {0,255,0}
static

RGB 0,255,0 : 

◆ m_uBlue

uint8_t Burger::RGBWord8_t::m_uBlue

8 bit blue value

◆ m_uGreen

uint8_t Burger::RGBWord8_t::m_uGreen

8 bit green value

◆ m_uRed

uint8_t Burger::RGBWord8_t::m_uRed

8 bit red value

◆ Maroon

const Burger::RGBWord8_t Burger::RGBWord8_t::Maroon = {128,0,0}
static

RGB 128,0,0 : 

◆ Navy

const Burger::RGBWord8_t Burger::RGBWord8_t::Navy = {0,0,128}
static

RGB 0,0,128 : 

◆ Olive

const Burger::RGBWord8_t Burger::RGBWord8_t::Olive = {128,128,0}
static

RGB 128,128,0 : 

◆ Orange

const Burger::RGBWord8_t Burger::RGBWord8_t::Orange = {255,165,0}
static

RGB 255,165,0 : 

◆ Purple

const Burger::RGBWord8_t Burger::RGBWord8_t::Purple = {128,0,128}
static

RGB 128,0,128 : 

◆ Red

const Burger::RGBWord8_t Burger::RGBWord8_t::Red = {255,0,0}
static

RGB 255,0,0 : 

◆ Silver

const Burger::RGBWord8_t Burger::RGBWord8_t::Silver = {192,192,192}
static

RGB 192,192,192 : 

◆ Teal

const Burger::RGBWord8_t Burger::RGBWord8_t::Teal = {0,128,128}
static

RGB 0,128,128 : 

◆ White

const Burger::RGBWord8_t Burger::RGBWord8_t::White = {255,255,255}
static

RGB 255,255,255 : 

◆ Yellow

const Burger::RGBWord8_t Burger::RGBWord8_t::Yellow = {255,255,0}
static

RGB 255,255,0 :