Automatic subtle colour changing on ws2812b with arduino
For the color, you can use the time (millis()) as a hue parameter.

void SwitchLED(int MyArray[], int n) {
    CRGB color = CHSV(millis()/1024, 255, 255);
    for (i = MyArray[0]; i &lt; MyArray[0]+n; i++) {
        leds[i] = color; 
    }
}


I used 1024 here to scale the time, so it takes 4 min 22 sec, to go through the hue cycle. And a power of two, should solve a visual glitch on millis() overflow.