CRBGArray question - Is there a way to define a name for a pixel

CRBGArray question - Is there a way to define a name for a pixel set and then just refer to the name to operate on those pixels?

If I create leds as:
CRGBArray<NUM_LEDS> leds;

Can I name a set of pixels (even and odd numbers for example), so in void loop(), instead of this:
leds(2,4,6,8) = CRGB::Red;
leds(3,5,7,9) = CRGB::Green;

I could refer to them like this:
leds(even) = CRGB::Red; // “even” would be 2,4,6,8
leds(odd) = CRGB::Green;

You can do something like this:

CRGBSet left(leds(0,19));
CRGBSet right(leds(39,20));

Oh - wait, misunderstood what you were asking for - no, there’s no good way yet to do the kind of element skipping that you describe.

I’m working on it, but getting something that’s usable, and not ambiguous, and explainable is tricky, so it will be a bit.

Ok, thanks for the info about element skipping. I will look forward to that. In the mean time, here’s a simple example of trying to rainbow fill a strip and then set the start and end to a color, but I’m still doing something wrong.
http://pastebin.com/VP6QLJ0r

Using a Teensy 3.0, IDE 1.6.5, and latest FastLED library. Error message included in the paste.

You only need:

partA = CHSV(0,180,255); // Not working.
partB = CHSV(82,255,255); // Not working.

You’ve already defined what part of leds partA and partB refer to.

Ah, ok! [cue light bulb with bing sound] I understand it now, thank you.

I too would be interested in a CRGB reference set for even and odd CRGB indicies. Maybe using such a routine somehow:

for (var i = 0; i < leds.length; i++) {
if(i % 2 === 0) { // index is even
Even(i) = leds[i];
} else Odd(i) = leds[i];
}

This has not been tested, but posted for theory…