Remembering a colour
The array CRGB leds[NUM_LEDS] only holds the current state of the LEDs. It is used to push the data out to the LEDs. If you want the code to save one color to use later, you need an extra variable, that can hold the color.

Add a variable at global scope:

CRGB saved_color;


In the if statements for R, G and B you can set this variable to the corresponding value, for example:

if(incomingByte == 'R'){
    saved_color = CRGB(255,0,0);
}


And in the if statements of 1 to 8 you can use this value, for example:

if (incomingByte == '1'){
    for (int i = 0; i &lt;= 44; i++) {
        leds[i] = saved_color;
    }
}


Note: The above code does not change any LEDs on R, G or B. They just set the color for future operation 1 to 8.