Hi everyone, i’m trying to find a way to do some kind of “complementary color” function, working accordily with the rainbow function. It works with stationary color… but i don’t know how to do the complementary color rainbow effect… any advice?
for( int i = 0; i < NUM_LEDS1; i++) {
leds1[i] = ColorFromPalette( RainbowColors_p, colorIndex, brightness, BLEND);
// leds1[i] = CRGB(0,0,255); // with this line works althought without rainbow movement…
leds2[i] = CRGB(255-leds1[i].red, 255-leds1[i].green, 255-leds1[i].blue);
You can generate roughly-complementary colours by using a fixed hue offset – use the same saturation and value, and satisfy ((hue1 - hue2) == someConstant).
Thankyou very much guys! I was playing now creating a custom palette, but tomorrow will give a try to you suggestion! as always, what a pleasure to be on this community!