HSL Color Chart?

I wanted to set one of my color lights to Cyan via my Motion Lighting App, but the predefined color "Cyan" doesn't exist in that list so I am left with defining a custom color via HSL. I found some sites on the internet that give the HSL formulas, and the answer was (180,100,50) which I converted into 50,100,50 since MLA doesn't support 360 degrees on hue, but rather 1-100 (180/360=50). The color I got was pinkish though. If I got= into my dashboard tile I can manually set a color which gets me exactly what I want, but the value given there is RGB which makes it difficult to convert for the rules. How do other people deal with this? Is there a simple chart I can reference for hubitat, can I add additional predefined colors somewhere?

Once you have the bulb where you want it, you can see what the Hue and Saturation value is on the Edit Device page. You can then assign that to the color manually.

2 Likes

It's odd that you're seeing it as pink ... If it was rendering it as 0-360, it should appear as yellow. HSL(50,100,50). Your other math was correct for H 0-100.

What device is this you're using?

Thank you, this is helpful!

This is an RGB led strip connected through a Gledopto controller.

If you assign the color manually from the device page like @M874585684875 suggested, does it work? :slight_smile:

Not home now, but will check tonight. Thanks!

1 Like

I don't like doing maths, so I find it easier to use a colour chart Colour picker
I look at the hue matrix so for red the HSL is (0, 100, 50) the Hue value is 360

FYI - I've been told that Hubitat uses the HSV model, not HSL. They are subtly different. See this thread: Setting HSL values for an RGB light - #27 by bertabcd1234 and this: HSL and HSV - Wikipedia

1 Like