FastLED 3.7.8
Loading...
Searching...
No Matches
CHSVPalette16 Class Reference

Detailed Description

HSV color palette with 16 discrete values.

Definition at line 656 of file colorutils.h.

#include <colorutils.h>

Public Member Functions

 CHSVPalette16 ()
 Default constructor.
 
 CHSVPalette16 (const CHSV &c00, const CHSV &c01, const CHSV &c02, const CHSV &c03, const CHSV &c04, const CHSV &c05, const CHSV &c06, const CHSV &c07, const CHSV &c08, const CHSV &c09, const CHSV &c10, const CHSV &c11, const CHSV &c12, const CHSV &c13, const CHSV &c14, const CHSV &c15)
 Create palette from 16 CHSV values.
 
 CHSVPalette16 (const CHSVPalette16 &rhs)
 Copy constructor.
 
CHSVPalette16operator= (const CHSVPalette16 &rhs)
 Copy constructor.
 
 CHSVPalette16 (const TProgmemHSVPalette16 &rhs)
 Create palette from palette stored in PROGMEM.
 
CHSVPalette16operator= (const TProgmemHSVPalette16 &rhs)
 Create palette from palette stored in PROGMEM.
 
CHSVoperator[] (uint8_t x)
 Array access operator to index into the gradient entries.
 
const CHSVoperator[] (uint8_t x) const
 Array access operator to index into the gradient entries.
 
CHSVoperator[] (int x)
 Array access operator to index into the gradient entries.
 
const CHSVoperator[] (int x) const
 Array access operator to index into the gradient entries.
 
 operator CHSV * ()
 Get the underlying pointer to the CHSV entries making up the palette.
 
bool operator== (const CHSVPalette16 &rhs) const
 Check if two palettes have the same color entries.
 
bool operator!= (const CHSVPalette16 &rhs) const
 Check if two palettes do not have the same color entries.
 
 CHSVPalette16 (const CHSV &c1)
 Create palette filled with one color.
 
 CHSVPalette16 (const CHSV &c1, const CHSV &c2)
 Create palette with a gradient from one color to another.
 
 CHSVPalette16 (const CHSV &c1, const CHSV &c2, const CHSV &c3)
 Create palette with three-color gradient.
 
 CHSVPalette16 (const CHSV &c1, const CHSV &c2, const CHSV &c3, const CHSV &c4)
 Create palette with four-color gradient.
 

Public Attributes

CHSV entries [16]
 the color entries that make up the palette
 

Constructor & Destructor Documentation

◆ CHSVPalette16() [1/8]

CHSVPalette16::CHSVPalette16 ( )
inline

Default constructor.

Warning
Default values are UNITIALIZED!

Definition at line 661 of file colorutils.h.

◆ CHSVPalette16() [2/8]

CHSVPalette16::CHSVPalette16 ( const CHSV & c00,
const CHSV & c01,
const CHSV & c02,
const CHSV & c03,
const CHSV & c04,
const CHSV & c05,
const CHSV & c06,
const CHSV & c07,
const CHSV & c08,
const CHSV & c09,
const CHSV & c10,
const CHSV & c11,
const CHSV & c12,
const CHSV & c13,
const CHSV & c14,
const CHSV & c15 )
inline

Create palette from 16 CHSV values.

Definition at line 664 of file colorutils.h.

◆ CHSVPalette16() [3/8]

CHSVPalette16::CHSVPalette16 ( const CHSVPalette16 & rhs)
inline

Copy constructor.

Definition at line 676 of file colorutils.h.

◆ CHSVPalette16() [4/8]

CHSVPalette16::CHSVPalette16 ( const TProgmemHSVPalette16 & rhs)
inline

Create palette from palette stored in PROGMEM.

Definition at line 689 of file colorutils.h.

◆ CHSVPalette16() [5/8]

CHSVPalette16::CHSVPalette16 ( const CHSV & c1)
inline

Create palette filled with one color.

Parameters
c1the color to fill the palette with

Definition at line 768 of file colorutils.h.

◆ CHSVPalette16() [6/8]

CHSVPalette16::CHSVPalette16 ( const CHSV & c1,
const CHSV & c2 )
inline

Create palette with a gradient from one color to another.

Parameters
c1the starting color for the gradient
c2the end color for the gradient

Definition at line 776 of file colorutils.h.

◆ CHSVPalette16() [7/8]

CHSVPalette16::CHSVPalette16 ( const CHSV & c1,
const CHSV & c2,
const CHSV & c3 )
inline

Create palette with three-color gradient.

Parameters
c1the starting color for the gradient
c2the middle color for the gradient
c3the end color for the gradient

Definition at line 785 of file colorutils.h.

◆ CHSVPalette16() [8/8]

CHSVPalette16::CHSVPalette16 ( const CHSV & c1,
const CHSV & c2,
const CHSV & c3,
const CHSV & c4 )
inline

Create palette with four-color gradient.

Parameters
c1the starting color for the gradient
c2the first middle color for the gradient
c3the second middle color for the gradient
c4the end color for the gradient

Definition at line 795 of file colorutils.h.

Member Function Documentation

◆ operator CHSV *()

CHSVPalette16::operator CHSV * ( )
inline

Get the underlying pointer to the CHSV entries making up the palette.

Definition at line 741 of file colorutils.h.

◆ operator!=()

bool CHSVPalette16::operator!= ( const CHSVPalette16 & rhs) const
inline

Check if two palettes do not have the same color entries.

Definition at line 761 of file colorutils.h.

◆ operator=() [1/2]

CHSVPalette16 & CHSVPalette16::operator= ( const CHSVPalette16 & rhs)
inline

Copy constructor.

Definition at line 682 of file colorutils.h.

◆ operator=() [2/2]

CHSVPalette16 & CHSVPalette16::operator= ( const TProgmemHSVPalette16 & rhs)
inline

Create palette from palette stored in PROGMEM.

Definition at line 700 of file colorutils.h.

◆ operator==()

bool CHSVPalette16::operator== ( const CHSVPalette16 & rhs) const
inline

Check if two palettes have the same color entries.

Definition at line 747 of file colorutils.h.

◆ operator[]() [1/4]

CHSV & CHSVPalette16::operator[] ( int x)
inline

Array access operator to index into the gradient entries.

Parameters
xthe index to retrieve
Returns
reference to an entry in the palette's color array
Note
This does not perform any interpolation like ColorFromPalette(), it accesses the underlying entries that make up the gradient. Beware of bounds issues!

Definition at line 729 of file colorutils.h.

◆ operator[]() [2/4]

const CHSV & CHSVPalette16::operator[] ( int x) const
inline

Array access operator to index into the gradient entries.

Parameters
xthe index to retrieve
Returns
reference to an entry in the palette's color array
Note
This does not perform any interpolation like ColorFromPalette(), it accesses the underlying entries that make up the gradient. Beware of bounds issues!

Definition at line 735 of file colorutils.h.

◆ operator[]() [3/4]

CHSV & CHSVPalette16::operator[] ( uint8_t x)
inline

Array access operator to index into the gradient entries.

Parameters
xthe index to retrieve
Returns
reference to an entry in the palette's color array
Note
This does not perform any interpolation like ColorFromPalette(), it accesses the underlying entries that make up the gradient. Beware of bounds issues!

Definition at line 717 of file colorutils.h.

◆ operator[]() [4/4]

const CHSV & CHSVPalette16::operator[] ( uint8_t x) const
inline

Array access operator to index into the gradient entries.

Parameters
xthe index to retrieve
Returns
reference to an entry in the palette's color array
Note
This does not perform any interpolation like ColorFromPalette(), it accesses the underlying entries that make up the gradient. Beware of bounds issues!

Definition at line 723 of file colorutils.h.

Member Data Documentation

◆ entries

CHSV CHSVPalette16::entries[16]

the color entries that make up the palette

Definition at line 658 of file colorutils.h.


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