Open TomWaterz opened 2 years ago
Here are the code locations where colors are chosen: randomPulse color generation cubePulse color selection starburst color selection
These all rely on baseColor
, which is randomly generated on this line
If you switch out baseColor
with a random selection from your array this should "work".
unsigned int baseColor = colorOptions[random(NUMBER_OF_COLORS)];
Minor correction to your array declaration, we also would need some code to convert from these hex values to their int counterpart (not shown in my examples).
const int NUMBER_OF_COLORS = 3;
const char* colorOptions[] = {"#FFA233", "#DC0000", "#8F00AB"};
Can someone help me figure out how to generate ripple colors from a set array of color values? I've tried doing it but can't seem to figure out how the color wheel works.
I have something like this
char colorOptions[3] = {'#FFA233', '#DC0000', '#8F00AB'};
and just want each ripple to randomly choose a color from this array.