Changing HUE
Posted: Sun May 01, 2016 2:01 am
Hi, I am using a PiZero to control some LED strips but my python knowledge is minimal.
My issue is how to change the HUE of a color.
Currently my code to light up the LED is
This works great but what I want to do is to change the hue of the color before sending it to the LED.
My pseudo code would be something like this.
But I have no idea where to really start.
I would love any advice.
Thanks.
Phil
My issue is how to change the HUE of a color.
Currently my code to light up the LED is
Code: Select all
color = 0xFF0000
strip.setPixelColor(1, color) My pseudo code would be something like this.
Code: Select all
color = 0xFF0000
Convert color to HSV
Increment the hue
Convert back to hex
strip.setPixelColor(1, updatedColor)I would love any advice.
Thanks.
Phil