Fading from color to color using for-loop FastLEDs I'm attempting to fade a strip of ws2812 7 pixels in length. Below I am using a for loop to increment the color red. I can fade it to red (from blue) but it will do it one pixel at a time or it just stays blue, depending where I move my r for-loop to. I need it to fade from color to color all 7 LEDs at once. 

I get no errors. 

I don't understand the process of getting NUM_LEDS leds all into x then proceeding with my color changing. Seems like I'm grabbing one pixel, fading it to red, then another...

fastLeds 3.03 library, arduino 1.0.6

#include &lt;FastLED.h&gt;
#define DATA_PIN 6
#define NUM_LEDS 7

#define BRIGHTNESS 45
#define COLOR_ORDER GRB
#define g 50
#define b 100
int r;
CRGB leds[NUM_LEDS];

void setup(){
  FastLED.addLeds&lt;WS2811, DATA_PIN, GRB&gt;(leds, NUM_LEDS);
}

void loop(){
  for(int x = 0; x &lt; NUM_LEDS; x++){
    delay(10);
    leds[x] = CRGB(r,g,b);
  }
  FastLED.show();
  delay(10); 

  //-------------------------

  for(int x = 0; x &lt; NUM_LEDS; x++){
    for(int r = 0; r &lt; 254; r++) {


if NUM_LEDS is holding the number 7 why can't I just do it like this below: leds[NUM_LEDS]?

      leds[x] = CRGB(r,g,b);
      FastLED.show();
      delay(100);
    }
  }
}
If you want to fade all the LEDs form blue to red at the same time, I think you want code like this (explanatory comments embedded)...

#include &lt;FastLED.h&gt;
#define DATA_PIN 6
#define NUM_LEDS 7

#define COLOR_ORDER GRB

CRGB leds[NUM_LEDS];

void setup(){
  FastLED.addLeds&lt;WS2811, DATA_PIN, GRB&gt;(leds, NUM_LEDS);

}
void loop(){

  // Let's take 256 steps to get from blue to red
  // (the most possible with an LED with 8 bit RGB values)

  for( int colorStep=0; colorStep&lt;256; colorStep++ ) {

      int r = colorStep;  // Redness starts at zero and goes up to full
      int b = 255-colorStep;  // Blue starts at full and goes down to zero
      int g = 0;              // No green needed to go from blue to red

      // Now loop though each of the LEDs and set each one to the current color

      for(int x = 0; x &lt; NUM_LEDS; x++){
          leds[x] = CRGB(r,g,b);
      }



      // Display the colors we just set on the actual LEDs
      FastLED.show();

      delay(10); 
  }

}