I am working on re-writing my existing code to be FastLED-native.

I am working on re-writing my existing code to be FastLED-native. Right now though, I’m just trying to quickly port over the bulk of it. I have an array like this:

CRGB colors[10] = {CRGB::Red, CRGB::Green, CRGB::Blue, CRGB::Gold, CRGB::Pink, CRGB::Purple, CRGB::White, CRGB::Yellow, CRGB::Orange, CRGB::Cyan};

If I do this, it works as expected:

CRGB color1 = CRGB::Pink;
CRGB color2 = CRGB::Yellow;

leds[13] = color1;
leds[34] = color1;
leds[57] = color1;
leds[58] = color1;

FastLED.show();

But if I do this, I get nothing:

CRGB color1 = colors[1];
CRGB color2 = colors[2];

leds[13] = color1;
leds[34] = color1;
leds[57] = color1;
leds[58] = color1;

FastLED.show();

Am I doing something wrong?

Where are you defining color1/2 and colors? (In functions, or globally?)

colors is defined globally. color1/2 are defined in a function.

I really need to stop making posts like this . I discovered the problem (although not the fix yet). It was caused by something I forgot about in setup. I was running a function to shuffle the values of the color array. Previously, this array consisted of single characters. I re-wrote the shuffle code so that it should handle CRGB, but I’ve obviously missed something. Sorry for the trouble!