   }
   FastLED.show();
 }
+
+
+void transition(CRGB *leds, int numOfLeds, CRGB firstColor, CRGB secondColor, int duration) {
+
+  int i, wait, deltaRed, deltaGreen, deltaBlue;
+
+  wait = duration / 20;
+  deltaRed = (secondColor.r - firstColor.r) / 20;
+  deltaGreen = (secondColor.g - firstColor.g) / 20;
+  deltaBlue = (secondColor.b - firstColor.b) / 20;
+
+  for(i = 0; i < numOfLeds; i++) {
+
+    leds[i] = firstColor;
+  }
+
+  FastLED.show();
+  delay(wait);
+
+  for(i = 0; i < numOfLeds; i++) {
+
+    leds[i].r += deltaRed;
+    leds[i].g += deltaGreen;
+    leds[i].b += deltaBlue;
+  }
+
+  FastLED.show();
+  delay(wait);
+
+  for(i = 0; i < numOfLeds; i++) {
+
+    leds[i].setRGB(0, 0 , 0);
+  }
+
+  FastLED.show();
+  delay(wait);
+}
void flashyShit(CRGB *leds, int numOfLeds, int ms){
  int middle = numOfLeds / 2;
  int randred,randgreen,randblue;
  
  for (int i = 0; i < numOfLeds / 2; i ++){
    randred = random8(7);
    randgreen = random8(7);
    randblue = random8(7);
    
    leds[middle + i].setRGB(randred,randgreen,randblue);
    leds[middle - i].setRGB(randred,randgreen,randblue);
    FastLED.show();
    delay(ms / (numOfLeds / 2));
    
    leds[middle + i].setRGB(0,0,0);
    leds[middle - i].setRGB(0,0,0);
    FastLED.show();
  }
  
  for (int i = numOfLeds / 2; i >= 0; i --){
    randred = random8(7);
    randgreen = random8(7);
    randblue = random8(7);
    
    leds[middle + i].setRGB(randred,randgreen,randblue);
    leds[middle - i].setRGB(randred,randgreen,randblue);
    FastLED.show();
    delay(ms / (numOfLeds / 2));
    
    leds[middle + i].setRGB(0,0,0);
    leds[middle - i].setRGB(0,0,0);
    FastLED.show();
  
  }
}


    if (ledsOn[randomIndex] == 0){
      leds[randomIndex].setRGB(red, green, blue);
      FastLED.show();

      ledsOn[randomIndex] = 1;
      onCounter ++;

      delay(ms / numOfLeds);
    }

  }

  clearAll(leds, numOfLeds);


}

