Perhaps.
Except for @AllenPitts’s first bad for loop…
for(int x = 256; x < NUM_LEDS; x--){
… I didn’t notice anything writing outside array boundaries.
But the strip def flashes ( or did with the bogus loop) when -1 turns up as the blue component, interpreted as 255. A stab of blue when blue is faded off and soon to fade back on.
@AllenPitts also referred to the immediate switch from red to blue as flashing. The simple question was how to make a fade go blue ← → red ← → blue ← → red smoothly both ways.
a7