Lumitronix_Iflex_Pro_Workshop
Library to interact with the iFlexPro
RgbwColor Struct Reference

#include <RgbwColor.h>

Inheritance diagram for RgbwColor:
RgbColorBase

Public Types

typedef NeoRgbwCurrentSettings SettingsObject
 

Public Member Functions

 RgbwColor (uint8_t r, uint8_t g, uint8_t b, uint8_t w=0)
 
 RgbwColor (uint8_t brightness)
 
 RgbwColor (const RgbColor &color)
 
 RgbwColor (const HtmlColor &color)
 
 RgbwColor (const HslColor &color)
 
 RgbwColor (const HsbColor &color)
 
 RgbwColor ()
 
bool operator== (const RgbwColor &other) const
 
bool operator!= (const RgbwColor &other) const
 
int16_t CompareTo (const RgbwColor &other, uint8_t epsilon=1)
 
uint8_t operator[] (size_t idx) const
 
uint8_t & operator[] (size_t idx)
 
bool IsMonotone () const
 
bool IsColorLess () const
 
uint8_t CalculateBrightness () const
 
RgbwColor Dim (uint8_t ratio) const
 
RgbwColor Brighten (uint8_t ratio) const
 
void Darken (uint8_t delta)
 
void Lighten (uint8_t delta)
 
uint16_t CalcTotalTenthMilliAmpere (const SettingsObject &settings)
 

Static Public Member Functions

static int16_t Compare (const RgbwColor &left, const RgbwColor &right, uint8_t epsilon=1)
 
static RgbwColor LinearBlend (const RgbwColor &left, const RgbwColor &right, float progress)
 
static RgbwColor LinearBlend (const RgbwColor &left, const RgbwColor &right, uint8_t progress)
 
static RgbwColor BilinearBlend (const RgbwColor &c00, const RgbwColor &c01, const RgbwColor &c10, const RgbwColor &c11, float x, float y)
 

Public Attributes

uint8_t R
 
uint8_t G
 
uint8_t B
 
uint8_t W
 

Static Public Attributes

static const uint8_t Max = 255
 
static const size_t Count = 4
 

Additional Inherited Members

- Static Protected Member Functions inherited from RgbColorBase
static float _CalcColor (float p, float q, float t)
 
static void _HslToRgb (const HslColor &color, float *r, float *g, float *b)
 
static void _HsbToRgb (const HsbColor &color, float *r, float *g, float *b)
 
template<typename T_COLOR , typename T_RESULT >
static T_RESULT _Compare (const T_COLOR &left, const T_COLOR &right, T_RESULT epsilon)
 

Member Typedef Documentation

◆ SettingsObject

Constructor & Destructor Documentation

◆ RgbwColor() [1/7]

RgbwColor::RgbwColor ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  w = 0 
)
inline

◆ RgbwColor() [2/7]

RgbwColor::RgbwColor ( uint8_t  brightness)
inline

◆ RgbwColor() [3/7]

RgbwColor::RgbwColor ( const RgbColor color)
inline

◆ RgbwColor() [4/7]

RgbwColor::RgbwColor ( const HtmlColor color)

◆ RgbwColor() [5/7]

RgbwColor::RgbwColor ( const HslColor color)

◆ RgbwColor() [6/7]

RgbwColor::RgbwColor ( const HsbColor color)

◆ RgbwColor() [7/7]

RgbwColor::RgbwColor ( )
inline

Member Function Documentation

◆ BilinearBlend()

RgbwColor RgbwColor::BilinearBlend ( const RgbwColor c00,
const RgbwColor c01,
const RgbwColor c10,
const RgbwColor c11,
float  x,
float  y 
)
static

◆ Brighten()

RgbwColor RgbwColor::Brighten ( uint8_t  ratio) const

◆ CalcTotalTenthMilliAmpere()

uint16_t RgbwColor::CalcTotalTenthMilliAmpere ( const SettingsObject settings)
inline

◆ CalculateBrightness()

uint8_t RgbwColor::CalculateBrightness ( ) const

◆ Compare()

static int16_t RgbwColor::Compare ( const RgbwColor left,
const RgbwColor right,
uint8_t  epsilon = 1 
)
inlinestatic

◆ CompareTo()

int16_t RgbwColor::CompareTo ( const RgbwColor other,
uint8_t  epsilon = 1 
)
inline

◆ Darken()

void RgbwColor::Darken ( uint8_t  delta)

◆ Dim()

RgbwColor RgbwColor::Dim ( uint8_t  ratio) const

◆ IsColorLess()

bool RgbwColor::IsColorLess ( ) const
inline

◆ IsMonotone()

bool RgbwColor::IsMonotone ( ) const
inline

◆ Lighten()

void RgbwColor::Lighten ( uint8_t  delta)

◆ LinearBlend() [1/2]

RgbwColor RgbwColor::LinearBlend ( const RgbwColor left,
const RgbwColor right,
float  progress 
)
static

◆ LinearBlend() [2/2]

RgbwColor RgbwColor::LinearBlend ( const RgbwColor left,
const RgbwColor right,
uint8_t  progress 
)
static

◆ operator!=()

bool RgbwColor::operator!= ( const RgbwColor other) const
inline

◆ operator==()

bool RgbwColor::operator== ( const RgbwColor other) const
inline

◆ operator[]() [1/2]

uint8_t& RgbwColor::operator[] ( size_t  idx)
inline

◆ operator[]() [2/2]

uint8_t RgbwColor::operator[] ( size_t  idx) const
inline

Member Data Documentation

◆ B

uint8_t RgbwColor::B

◆ Count

const size_t RgbwColor::Count = 4
static

◆ G

uint8_t RgbwColor::G

◆ Max

const uint8_t RgbwColor::Max = 255
static

◆ R

uint8_t RgbwColor::R

◆ W

uint8_t RgbwColor::W