Does FastLED.h provides a function that can get the color value of a LED?Like this
LED[I]=CHSV(LED[0].getColor(),LED[0].getSaturation(),LED[0].getBrightness());
I can’t find it in the document of FastLED
Thanks!
Once you assign (either RGB or HSV) values to a pixel it gets stored in the CRGB array as RGB values. You can access that at any time. For example if you wanted the RGB data for leds[0] you could do something like this:
Serial.print("leds[0] RGB: “); Serial.print(leds[0].r); Serial.print(” “); Serial.print(leds[0].g); Serial.print(” "); Serial.println(leds[0].b);
Also, here’s an example if you want that data back as HSV, but converting it back from RGB isn’t away exact.
Thanks for that example Marc. I was working with a local artist and he wanted waves of just soft white. The only problem is that as you get to very low intensity, the colour skews signficantly. I’m ordering up some soft white SK6812’s to play with.
@Andrew_Tuline I think you’re on the right track if the artist only wants white.