Hi, I was wondering if anyone could help me ,

Hi, I was wondering if anyone could help me , im trying to get the actual rgb value from = ColorFromPalette( LavaColors_p, colorIndex, brightness); because im going to pass it into a setPixelColor() for some animation stuff im trying to do. …

I’m new to fastled so any advice would be great… color = ColorFromPalette( LavaColors_p, colorIndex, brightness); just give me 1 printed in the console… prob not defining the proper type to return the rgb value.

–>> need rgb to pass into set pixel color
color = ColorFromPalette( LavaColors_p, colorIndex, brightness);
strip.setPixelColor(N_PIXELS_HALF-peak-1,color);
strip.setPixelColor(N_PIXELS_HALF+peak,color);

First your variable “color” should be a CRGB if it isn’t already.

CRGB color;

Then once you assign some values to color, you can use it elsewhere, such as:
color = ColorFromPalette( LavaColors_p, colorIndex);
fill_solid(leds, NUM_LEDS, color);

You can also access the individual r,g,b values if needed like so:
Serial.println(color.r);
Serial.println(color.g);
Serial.println(color.b);

You can get the color code by doing something like (color.r << 16 | color.g << 8 | color.b)