FastLED 3.9.7
Loading...
Searching...
No Matches
Color3i Struct Reference

Detailed Description

Definition at line 8 of file color.h.

Public Member Functions

 Color3i (uint8_t r, uint8_t g, uint8_t b)
 
 Color3i (const Color3i &other)
 
void Set (uint8_t r, uint8_t g, uint8_t b)
 
void Set (const Color3i &c)
 
void Mul (const Color3i &other_color)
 
void Mulf (float scale)
 
void Mul (uint8_t val)
 
void Sub (const Color3i &color)
 
void Add (const Color3i &color)
 
uint8_t Get (int rgb_index) const
 
void Set (int rgb_index, uint8_t val)
 
void Fill (uint8_t val)
 
uint8_t MaxRGB () const
 
template<typename PrintStream >
void Print (PrintStream *stream) const
 
void Interpolate (const Color3i &other_color, float t)
 
uint8_t * At (int rgb_index)
 
const uint8_t * At (int rgb_index) const
 

Static Public Member Functions

static Color3i Black ()
 
static Color3i White ()
 
static Color3i Red ()
 
static Color3i Orange ()
 
static Color3i Yellow ()
 
static Color3i Green ()
 
static Color3i Cyan ()
 
static Color3i Blue ()
 

Public Attributes

uint8_t r_
 
uint8_t g_
 
uint8_t b_
 

Constructor & Destructor Documentation

◆ Color3i() [1/3]

Color3i::Color3i ( uint8_t r,
uint8_t g,
uint8_t b )
inline

Definition at line 17 of file color.h.

◆ Color3i() [2/3]

Color3i::Color3i ( )
inline

Definition at line 18 of file color.h.

◆ Color3i() [3/3]

Color3i::Color3i ( const Color3i & other)
inline

Definition at line 19 of file color.h.

Member Function Documentation

◆ Add()

void Color3i::Add ( const Color3i & color)

Definition at line 43 of file color.cpp.

◆ At() [1/2]

uint8_t * Color3i::At ( int rgb_index)

Definition at line 81 of file color.cpp.

◆ At() [2/2]

const uint8_t * Color3i::At ( int rgb_index) const

Definition at line 91 of file color.cpp.

◆ Black()

static Color3i Color3i::Black ( )
inlinestatic

Definition at line 9 of file color.h.

◆ Blue()

static Color3i Color3i::Blue ( )
inlinestatic

Definition at line 16 of file color.h.

◆ Cyan()

static Color3i Color3i::Cyan ( )
inlinestatic

Definition at line 15 of file color.h.

◆ Fill()

void Color3i::Fill ( uint8_t val)
inline

Definition at line 32 of file color.h.

◆ Get()

uint8_t Color3i::Get ( int rgb_index) const

Definition at line 53 of file color.cpp.

◆ Green()

static Color3i Color3i::Green ( )
inlinestatic

Definition at line 14 of file color.h.

◆ Interpolate()

void Color3i::Interpolate ( const Color3i & other_color,
float t )

Definition at line 67 of file color.cpp.

◆ MaxRGB()

uint8_t Color3i::MaxRGB ( ) const
inline

Definition at line 33 of file color.h.

◆ Mul() [1/2]

void Color3i::Mul ( const Color3i & other_color)

Definition at line 10 of file color.cpp.

◆ Mul() [2/2]

void Color3i::Mul ( uint8_t val)
inline

Definition at line 25 of file color.h.

◆ Mulf()

void Color3i::Mulf ( float scale)

Definition at line 22 of file color.cpp.

◆ Orange()

static Color3i Color3i::Orange ( )
inlinestatic

Definition at line 12 of file color.h.

◆ Print()

template<typename PrintStream >
void Color3i::Print ( PrintStream * stream) const
inline

Definition at line 39 of file color.h.

◆ Red()

static Color3i Color3i::Red ( )
inlinestatic

Definition at line 11 of file color.h.

◆ Set() [1/3]

void Color3i::Set ( const Color3i & c)
inline

Definition at line 22 of file color.h.

◆ Set() [2/3]

void Color3i::Set ( int rgb_index,
uint8_t val )

Definition at line 59 of file color.cpp.

◆ Set() [3/3]

void Color3i::Set ( uint8_t r,
uint8_t g,
uint8_t b )
inline

Definition at line 21 of file color.h.

◆ Sub()

void Color3i::Sub ( const Color3i & color)

Definition at line 33 of file color.cpp.

◆ White()

static Color3i Color3i::White ( )
inlinestatic

Definition at line 10 of file color.h.

◆ Yellow()

static Color3i Color3i::Yellow ( )
inlinestatic

Definition at line 13 of file color.h.

Member Data Documentation

◆ b_

uint8_t Color3i::b_

Definition at line 52 of file color.h.

◆ g_

uint8_t Color3i::g_

Definition at line 52 of file color.h.

◆ r_

uint8_t Color3i::r_

Definition at line 52 of file color.h.


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