Hi,
I want to use this palette:
http://soliton.vm.bytemark.co.uk/pub/cpt-city/cb/div/tn/BrBG_03.png.index.html
And I use this definition:
DEFINE_GRADIENT_PALETTE( BrBG_03_gp ) {
0, 165,117, 25,
84, 165,117, 25,
84, 229,233,230,
170, 229,233,230,
170, 17,118, 95,
255, 17,118, 95};
when I print palette array with this code:
CRGB tt;
CRGBPalette16 myPal = BrBG_03_gp;
for(int index = 0; index < 256; index++)
{
tt=ColorFromPalette(myPal,index,BRIGHTNESS,NOBLEND);
Serial.print(index);
Serial.print(" ");
Serial.print(tt.r);
Serial.print(" ");
Serial.print(tt.g);
Serial.print(" ");
Serial.println(tt.b);
}
I expect that the colors changed in index 84 and 170 but colors changed in index 112 and 192 !? What is the matter?