Hi All - Hopefully a quick one - I just want to check if

fastled-support
gplus
(Psych0 _) #1

Hi All -

Hopefully a quick one - I just want to check if my understanding is correct when defining gradient colour palettes.

A CRGBPalette16 can accept UPTO 16 discrete colour definitions - i.e The default Rainbow_gp has 9

DEFINE_GRADIENT_PALETTE( Rainbow_gp ) {
0, 255, 0, 0, // Red
32, 171, 85, 0, // Orange
64, 171,171, 0, // Yellow
96, 0,255, 0, // Green
128, 0,171, 85, // Aqua
160, 0, 0,255, // Blue
192, 85, 0,171, // Purple
224, 171, 0, 85, // Pink
255, 255, 0, 0};// and back to Red

The Documentation makes mention that the ‘The 16-entry variety automatically interpolates between its entries to produce a full 256-element color map’.

Question - Am I able to specify a CRGBPalette with more than 16 discrete colour definitions?

Is that what the CRGBPalette32 and CRGBPalette256 are for?

Sometimes when using Palette Knife the desired gradient palettes contain upwards of 40 - 90 discrete colour definitions.
For instance if I wanted to you this gradient (as a bland example)
// Gradient palette “db_e_gp”, originally from
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/jm/db/tn/db-e.png.index.html

Would I declare it as:

CRGBPalette256 myPalette = db_e_gp;

and use as per a CRGBPalette16

Cheers Tom

(Kyle bostick) #2

following, i would love to know the answer to this