I have a table array of 10 colors as follows:
int myColors[][3] = {
{0, 0, 0}, //no potion
{200, 25, 30}, // 1; Wild Strawberry
{255, 150, 0}, // 2; Dandelion
{55, 0, 255}, // Denim Blue
{0, 255, 0}, // 4; Chartreuse
{222, 255, 0}, // 5; Sunglow
{50, 50, 255}, // 6; Sky Blue
{255, 25, 0}, // 7; Salmon
{40, 255, 0}, // 8; Electric Lime
{255, 0, 255}, // 9; Fuchsia
{0, 255, 255}, // 10; Aquamarine
};
And I have 7 Adafruit Jewels, little round 'buttons', with 7 neopixels each, a total of 49 pixels
Adafruit_NeoPixel myPixels = Adafruit_NeoPixel(totalPixels, PixelsPin, NEO_GRB + NEO_KHZ800);
I need to fade 2 buttons in/out at the same time, so one is fading from 'OFF' from the color, and the other is fading 'ON' to the color.
I set the pixels like this:
for(int x = 0; x < 7; x++) { //do this 7 times
for (int y = Pixel1Start, y < Pixel1Start + 7; y++) { //fade the first Jewel
//SET THE FADE VALUE HERE
myPixels.setPixelColor(y,Rval,Gval,Bval); //set pixel values
}
for (int z = Pixel2Start, z < Pixel2Start + 7; y++) { //fade the first Jewel
//INVERSE OF THE FADE VALUE HERE
myPixels.setPixelColor(z,Rval,Gval,Bval); //set pixel values
}
FlaskPixels.show();
}
So, how would I use any given color, say myColors[1], and have one Jewel fade on and one fade off. I'm familiar with fading a single LED, but not one made up of RGB values.