FastLED 3.9.3
Loading...
Searching...
No Matches
CHSVPalette256 Class Reference

Detailed Description

HSV color palette with 256 discrete values.

Definition at line 867 of file colorutils.h.

#include <colorutils.h>

Public Member Functions

 CHSVPalette256 ()
 Default constructor.
 
 CHSVPalette256 (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.
 
 CHSVPalette256 (const CHSVPalette256 &rhs)
 Copy constructor.
 
CHSVPalette256operator= (const CHSVPalette256 &rhs)
 Copy constructor.
 
 CHSVPalette256 (const CHSVPalette16 &rhs16)
 Create upscaled palette from 16-entry palette.
 
CHSVPalette256operator= (const CHSVPalette16 &rhs16)
 Create upscaled palette from 16-entry palette.
 
 CHSVPalette256 (const TProgmemRGBPalette16 &rhs)
 Create palette from palette stored in PROGMEM.
 
CHSVPalette256operator= (const TProgmemRGBPalette16 &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 CHSVPalette256 &rhs) const
 Check if two palettes have the same color entries.
 
bool operator!= (const CHSVPalette256 &rhs) const
 Check if two palettes do not have the same color entries.
 
 CHSVPalette256 (const CHSV &c1)
 Create palette filled with one color.
 
 CHSVPalette256 (const CHSV &c1, const CHSV &c2)
 Create palette with a gradient from one color to another.
 
 CHSVPalette256 (const CHSV &c1, const CHSV &c2, const CHSV &c3)
 Create palette with three-color gradient.
 
 CHSVPalette256 (const CHSV &c1, const CHSV &c2, const CHSV &c3, const CHSV &c4)
 Create palette with four-color gradient.
 

Public Attributes

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

Constructor & Destructor Documentation

◆ CHSVPalette256() [1/9]

CHSVPalette256::CHSVPalette256 ( )
inline

Default constructor.

Warning
Default values are UNITIALIZED!

Definition at line 872 of file colorutils.h.

◆ CHSVPalette256() [2/9]

CHSVPalette256::CHSVPalette256 ( 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 878 of file colorutils.h.

◆ CHSVPalette256() [3/9]

CHSVPalette256::CHSVPalette256 ( const CHSVPalette256 & rhs)
inline

Copy constructor.

Definition at line 889 of file colorutils.h.

◆ CHSVPalette256() [4/9]

CHSVPalette256::CHSVPalette256 ( const CHSVPalette16 & rhs16)
inline

Create upscaled palette from 16-entry palette.

Definition at line 901 of file colorutils.h.

◆ CHSVPalette256() [5/9]

CHSVPalette256::CHSVPalette256 ( const TProgmemRGBPalette16 & rhs)
inline

Create palette from palette stored in PROGMEM.

Definition at line 913 of file colorutils.h.

◆ CHSVPalette256() [6/9]

CHSVPalette256::CHSVPalette256 ( const CHSV & c1)
inline

Create palette filled with one color.

Parameters
c1the color to fill the palette with

Definition at line 975 of file colorutils.h.

◆ CHSVPalette256() [7/9]

CHSVPalette256::CHSVPalette256 ( 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 980 of file colorutils.h.

◆ CHSVPalette256() [8/9]

CHSVPalette256::CHSVPalette256 ( 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 985 of file colorutils.h.

◆ CHSVPalette256() [9/9]

CHSVPalette256::CHSVPalette256 ( 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 990 of file colorutils.h.

Member Function Documentation

◆ operator CHSV *()

CHSVPalette256::operator CHSV * ( )
inline

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

Definition at line 949 of file colorutils.h.

◆ operator!=()

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

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

Definition at line 969 of file colorutils.h.

◆ operator=() [1/3]

CHSVPalette256 & CHSVPalette256::operator= ( const CHSVPalette16 & rhs16)
inline

Create upscaled palette from 16-entry palette.

Definition at line 906 of file colorutils.h.

◆ operator=() [2/3]

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

Copy constructor.

Definition at line 894 of file colorutils.h.

◆ operator=() [3/3]

CHSVPalette256 & CHSVPalette256::operator= ( const TProgmemRGBPalette16 & rhs)
inline

Create palette from palette stored in PROGMEM.

Definition at line 919 of file colorutils.h.

◆ operator==()

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

Check if two palettes have the same color entries.

Definition at line 955 of file colorutils.h.

◆ operator[]() [1/4]

CHSV & CHSVPalette256::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 938 of file colorutils.h.

◆ operator[]() [2/4]

const CHSV & CHSVPalette256::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 943 of file colorutils.h.

◆ operator[]() [3/4]

CHSV & CHSVPalette256::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 927 of file colorutils.h.

◆ operator[]() [4/4]

const CHSV & CHSVPalette256::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 932 of file colorutils.h.

Member Data Documentation

◆ entries

CHSV CHSVPalette256::entries[256]

the color entries that make up the palette

Definition at line 869 of file colorutils.h.


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