You have an arrangement of LEDs that is 25 columns wide (not counting empty columns). If you create an array that maps each individual LED to its corresponding column position, then you can have FastLED generate a 25-pixel wide rainbow pattern, to get the colors for each of the columns in your display, then set the color of each of your LEDs to the color for the column in which it resides. Here is an example, might be easier to understand than my trying to describe what it is doing:
#include <FastLED.h>
#define NUM_LEDS 53
#define DATA_PIN 12
#define DISPLAY_COLUMNS 25 //display is 25 columns wide
CRGB leds[NUM_LEDS];
byte gHue;
//map each pixel to its column position in the display
byte ledmap[NUM_LEDS] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 11, 12, 12, 13, 13, 14, 15, 16, 17, 18, 18,
18, 19, 19, 20, 21, 22, 23, 23, 24, 24, 24, 24, 24, 24, 24, 23,
22, 21, 21, 20, 19
};
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.setBrightness(32);
FastLED.clear();
FastLED.show();
}
void loop() {
gHue = random(255);
rainbow();
FastLED.show();
delay(10000);
rainbowWithGlitter();
FastLED.show();
delay(10000);
}
void rainbow()
{
// FastLED's built-in rainbow generator
fill_rainbow( leds, DISPLAY_COLUMNS, gHue, 5);
map_leds();
}
void rainbowWithGlitter()
{
// built-in FastLED rainbow, plus some random sparkly glitter
rainbow();
addGlitter(100);
}
void addGlitter( fract8 chanceOfGlitter)
{
if ( random8() < chanceOfGlitter) {
leds[ random16(NUM_LEDS) ] += CRGB::White;
}
}
void map_leds()
{
for (int8_t i = NUM_LEDS - 1; i >= 0; i--) {
leds[i] = leds[ledmap[i]];
}
}
Note that I've had FastLED generate the rainbow pattern using the leds[] array, then done the copying from the end of the strip towards the beginning, with your arrangement of LEDs that works without overwriting the rainbow pattern, if the LEDs had been arranged differently it might have been necessary to store the rainbow pattern outside the leds[] array to prevent altering it in the process.