I’m using a web app to set the HSV values of my leds using the FastLED library (only Hue actually, Saturation and Brightness are set to 255). Now I want to do a HSV to RGB conversion, so I can use the RGB value for my web app background color or something. How do I do this? Can you point me in the right direction? Using a Particle Photon and Neopixel led ring.
I’ve found the snippet below but I don’t know how to output the actual RGB value so I can send it back:
// HSV (Rainbow) to RGB color conversion
CHSV hsv( 160, 255, 255); // pure blue in HSV Rainbow space
CRGB rgb;
hsv2rgb_rainbow( hsv, rgb);
// rgb will now be (0, 0, 255) – pure blue as RGB