Is there a way to set all the LEDS in your array to a

Is there a way to set all the LEDS in your array to a CRGB color without having to use a for loop: i.e. -for( int i = 0; i < NUM_LEDS; i++) etc. ?

Kinda of like FastLED.clear(); clears all the Leds in your array at once?

Probably not the correct answer but…

Even if there was a way… in the back end of the library it would still have to iterate over each LED in turn, as each LED is just expecting a 24-bit RGB value (I.e - it will use a for loop to iterate over each 24-bit block of RGB values) please correct me if I’m wrong about this…

fill_solid(leds, NUM_LEDS, CRGB::Red);

Fair enough :raised_hands:t3: you learn something new every day

Thanks Jeremy, I thought there probably must be a way to do this.

@dalemorris164 I think you are mostly right, the library will resolve the fill_solid() function into a for loop automatically. Apart from being a shorter expression (that is an advantage just by itself), the compiler ultimately creates the same instructions at the end so no memory saved here or faster execution ( I think…).

And also:
FastLED.showColor(CRGB::Red);

Thanks for all the great responses to my question. I’m learning a lot. On that note; is there an all inclusive FastLED online document that I can access that lists all of the FastLED functions. The only one that I was able to find is this:

http://fastled.io/docs/3.1/class_c_fast_l_e_d.html

Looking for something similar to the Arduino Reference Language page like this:

https://www.arduino.cc/reference/en/

There is not an all inclusive reference. Searching the http://fastled.io/docs can be good though and there are sometimes comments in the code explaining something. Otherwise you just have to study the code a bit to see how something works.
And keep asking here on G+.