hello, I am looking for some help,

fastled-support
gplus
(K B) #1

hello, I am looking for some help, I have a program where I have lots of effects from palettes, but the palettes are only a max of 4 colors, or a pre-defined gradient. I want to make a palette, my issue is i want to know how to fill it solid with no changing of colors, as well as fill it solid but so it cycles through the colors in my palette. I want to have 5-6 colors in my palettes. I have attached the program i am trying to edit

(Ken White) #2

@K_B11 - Look at @Mark_Kriegsman 's following sketches:

It is a great way to learn about palettes.

FYI, a palette created with CRGBPalette16 can have 16 different colors in it.

To have a palette of a single color, I have used the following to set the palette to red:

CRGBPalette16 currentPalette( CRGB::Red); // this is located before the Setup.

Later in your sketch you can change palettes by using:

currentPalette = CRGBPalette16(CRGB::Purple);

As to your 5-6 colors question, I would recommend that you try making different color combinations in a palette or in a gradient palette. Next, try out these new palettes in simple test sketch and see what happens, i.e. experiment with different palettes that you create to get the results that you want. I have used Mark’s aforementioned sketches to test my new palettes.

Also for your 5-6 colors question, you might want to look at the palette knife tool. See at the following webpage to learn more about the palette knife tool:

http://fastled.io/tools/paletteknife/

Finally, @Erin_St_Blaine has a great primer on how to use the palette knife tool at:

and at:

(K B) #3

Can I make the palette, instead of using the palette knife? I want to define my own palette, I do not want it to be a gradient, and i want it set to NOBLEND

(Ken White) #4

@K_B11 - Yes, you can make palettes without using the palette knife tool. Look at lines 1023 to 1109 in your own sketch. That is making your own palettes without the palette knife tool. Also, look at lines 101 to 188 in Mark’s sketch:

This is where he makes palettes without the palette knife tool and he explains the FastLED palette. In Mark’s other sketch, look at lines 85 to 94 where palettes are made or defined.

Finally, you can look at lines 338 to 392 in:

for an explanation on how to create palettes.