                   NUM_LEDS-1, CHSV(pots.var, pots.sat, pots.val));
 }
 
-// Draw the rainbow. The additional parameter moves the rainbow back and forth.
+// Animate the rainbow. The hue parameter moves the rainbow back and forth,
+// while the additional parameter regulates the animation speed.
 void modeRainbow() {
     uint8_t hue;
     for (uint8_t led = 0; led < NUM_LEDS; led++) {
-        hue = ledAngle(led);
-        hue += pots.var;
-        leds[led] = CHSV(hue, pots.sat, pots.val);
-    }
-}
-
-// Draw the rainbow, and gradually move it according to the addition parameter,
-// which regulates the speed.
-void modeRainbowCycle() {
-    uint8_t hue;
-    for (uint8_t led = 0; led < NUM_LEDS; led++) {
-        hue = ledAngle(led);
-        hue += animation();
+        hue = ledAngle(led) + animation() + pots.hue;
         leds[led] = CHSV(hue, pots.sat, pots.val);
     }
 }

    &modeGradient,
    &modeEase,
    &modeRainbow,
    &modeRainbowCycle,
    &modeRainbowTrain,
    &modeSine,
    &modeBreathe,
    &modeOff
};


void modeGradient();
void modeOff();
void modeRainbow();
void modeRainbowTrain();
void modeSine();
void modeSolid();
