I played around, but all I could find out was that the palette is shortened if I use a low value for incIndex and the palette get streched beyond my strip if I use a higher value.
But how is this calculated.
That value do I need to fit the palette perfectly on my led strip?
You can see that the fill_palette function contains the ColorFromPalette function. Look at @marmil ’s excellent explanation for the index in the ColorFromPalette function in the responses section of the following post: