Lumitronix_Iflex_Pro_Workshop
Library to interact with the iFlexPro
Rgb48Color Struct Reference

#include <Rgb48Color.h>

Inheritance diagram for Rgb48Color:
RgbColorBase

Public Types

typedef NeoRgbCurrentSettings SettingsObject
 

Public Member Functions

 Rgb48Color (uint16_t r, uint16_t g, uint16_t b)
 
 Rgb48Color (uint16_t brightness)
 
 Rgb48Color (const RgbColor &color)
 
 Rgb48Color (const RgbwColor &color)
 
 Rgb48Color (const Rgbw64Color &color)
 
 Rgb48Color (const HtmlColor &color)
 
 Rgb48Color (const HslColor &color)
 
 Rgb48Color (const HsbColor &color)
 
 Rgb48Color ()
 
bool operator== (const Rgb48Color &other) const
 
bool operator!= (const Rgb48Color &other) const
 
int32_t CompareTo (const Rgb48Color &other, uint16_t epsilon=256)
 
uint16_t operator[] (size_t idx) const
 
uint16_t & operator[] (size_t idx)
 
uint16_t CalculateBrightness () const
 
Rgb48Color Dim (uint16_t ratio) const
 
Rgb48Color Dim (uint8_t ratio) const
 
Rgb48Color Brighten (uint16_t ratio) const
 
Rgb48Color Brighten (uint8_t ratio) const
 
void Darken (uint16_t delta)
 
void Lighten (uint16_t delta)
 
uint32_t CalcTotalTenthMilliAmpere (const SettingsObject &settings)
 

Static Public Member Functions

static int32_t Compare (const Rgb48Color &left, const Rgb48Color &right, uint16_t epsilon=256)
 
static Rgb48Color LinearBlend (const Rgb48Color &left, const Rgb48Color &right, float progress)
 
static Rgb48Color LinearBlend (const Rgb48Color &left, const Rgb48Color &right, uint8_t progress)
 
static Rgb48Color BilinearBlend (const Rgb48Color &c00, const Rgb48Color &c01, const Rgb48Color &c10, const Rgb48Color &c11, float x, float y)
 

Public Attributes

uint16_t R
 
uint16_t G
 
uint16_t B
 

Static Public Attributes

static const uint16_t Max = 65535
 
static const size_t Count = 3
 

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

◆ Rgb48Color() [1/9]

Rgb48Color::Rgb48Color ( uint16_t  r,
uint16_t  g,
uint16_t  b 
)
inline

◆ Rgb48Color() [2/9]

Rgb48Color::Rgb48Color ( uint16_t  brightness)
inline

◆ Rgb48Color() [3/9]

Rgb48Color::Rgb48Color ( const RgbColor color)
inline

◆ Rgb48Color() [4/9]

Rgb48Color::Rgb48Color ( const RgbwColor color)
inlineexplicit

◆ Rgb48Color() [5/9]

Rgb48Color::Rgb48Color ( const Rgbw64Color color)
explicit

◆ Rgb48Color() [6/9]

Rgb48Color::Rgb48Color ( const HtmlColor color)
inline

◆ Rgb48Color() [7/9]

Rgb48Color::Rgb48Color ( const HslColor color)

◆ Rgb48Color() [8/9]

Rgb48Color::Rgb48Color ( const HsbColor color)

◆ Rgb48Color() [9/9]

Rgb48Color::Rgb48Color ( )
inline

Member Function Documentation

◆ BilinearBlend()

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

◆ Brighten() [1/2]

Rgb48Color Rgb48Color::Brighten ( uint16_t  ratio) const

◆ Brighten() [2/2]

Rgb48Color Rgb48Color::Brighten ( uint8_t  ratio) const
inline

◆ CalcTotalTenthMilliAmpere()

uint32_t Rgb48Color::CalcTotalTenthMilliAmpere ( const SettingsObject settings)
inline

◆ CalculateBrightness()

uint16_t Rgb48Color::CalculateBrightness ( ) const

◆ Compare()

static int32_t Rgb48Color::Compare ( const Rgb48Color left,
const Rgb48Color right,
uint16_t  epsilon = 256 
)
inlinestatic

◆ CompareTo()

int32_t Rgb48Color::CompareTo ( const Rgb48Color other,
uint16_t  epsilon = 256 
)
inline

◆ Darken()

void Rgb48Color::Darken ( uint16_t  delta)

◆ Dim() [1/2]

Rgb48Color Rgb48Color::Dim ( uint16_t  ratio) const

◆ Dim() [2/2]

Rgb48Color Rgb48Color::Dim ( uint8_t  ratio) const
inline

◆ Lighten()

void Rgb48Color::Lighten ( uint16_t  delta)

◆ LinearBlend() [1/2]

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

◆ LinearBlend() [2/2]

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

◆ operator!=()

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

◆ operator==()

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

◆ operator[]() [1/2]

uint16_t& Rgb48Color::operator[] ( size_t  idx)
inline

◆ operator[]() [2/2]

uint16_t Rgb48Color::operator[] ( size_t  idx) const
inline

Member Data Documentation

◆ B

uint16_t Rgb48Color::B

◆ Count

const size_t Rgb48Color::Count = 3
static

◆ G

uint16_t Rgb48Color::G

◆ Max

const uint16_t Rgb48Color::Max = 65535
static

◆ R

uint16_t Rgb48Color::R