     fill_solid(&leds[0], NUM_LEDS, CHSV(pots.hue, pots.sat, value));
 }
 
+// Fill all LEDs with a single color, animating between two hues in a cubic
+// ease in-out wave resembling a sine wave. The speed is calculated
+// automatically based on distance on the color wheel.
+void modeBreatheGradient() {
+    uint8_t angle;
+    uint8_t hue;
+    uint8_t distance;
+    uint8_t speed;
+
+    distance = pots.var - pots.hue;
+    speed = 255 - map8(distance, 15, 130);
+
+    angle = cubicwave8(animation(speed));
+    hue = map8(angle, pots.hue, pots.var);
+
+    fill_solid(&leds[0], NUM_LEDS, CHSV(hue, pots.sat, pots.val));
+}
+
 // Animate each LED's intensity according to a sine wave.
 void modeSine() {
     uint8_t angle;
     uint8_t value;
-    uint8_t an = animation();
+    uint8_t an = animation(pots.var);
     for (uint8_t led = 0; led < NUM_LEDS; led++) {
         angle = ledAngle(led);
         value = sin8(angle + an);

void modeEase() {
    uint8_t angle;
    uint8_t value;
    uint8_t an = animation();
    for (uint8_t led = 0; led < NUM_LEDS; led++) {
        angle = map(led, 0, NUM_LEDS-1, 0, 255);
        value = ease8InOutCubic(sin8(angle + an));

    uint8_t sine;
    uint8_t value;

    sine = cubicwave8(animation(pots.var));
    start = pots.val - 100;
    if (start > pots.val) {
        start = 0;
    }
    value = map8(sine, start, pots.val);

#ifdef DEBUG_ANIMATION
    char buf[128];
