Python script to do HSV->RGB conversion

Hi all,

In order to make a template light for my Dreamscreen, I had to implement a HSV->RGB conversion script as the template light uses HSV but dreamscreen uses RGB… It might be useful to someone else someday, so here it is. Right now it’s just hardcoded to set the color of my dreamscreen device, but this could easily be converted to return the color for some other purpose, just let me know and I’ll make you a version that does that if you don’t know how.

1 Like
import colorsys
colorsys.hsv_to_rgb(h, s, v)

I don’t think imports are allowed in python scripts are they?