I have some confusion about the use of color palettes. How does the code create the last 16 values of a 256 color palette? This comes up in the context of creating a palette with a constant hue (purple) and variable brightness - running from max brightness to black. I used a gradient palette definition, and it works as expected, until it reaches the last 16 values. If I run the brightness up from zero, the last sixteen leds decrease in brightness. If I run it with brightness decreasing, it goes to zero at position 240, and the last 16 leds show increasing brightness. I’m testing with a 16x16 matrix to show each value.
The decreasing gradient palette is defined as
( 0, 255 , 0 , 255,
63, 191 , 0 , 191 ,
127, 127 , 0 , 127 ,
191 , 63 , 0 , 63 ,
255 , 0 , 0 , 0 )
I would have thought this would create the black anchor point at position 256 (index 255 in code) but that doesn’t seem to be the case.