Assigning Hue Colors

Can someone point me to an explanation of how to set a custom hue light bulb color in the Rules setup?

Color Value: 0..100
Saturation Value: 0..100

Is there a table somewhere?

Thanks!

1 Like

The Color Value is Hue (0..360) mapped into 0..100 for compatibility reasons.
Saturation is not changed.
Together with level these form the HSV color model:

1 Like

Thanks for the help. Got things working the way I want!

1 Like

That is really weird that hubitat is remapping 0 degree to 360 degree hue values to a 1 to 100 scale. It's annoying to have to manually convert HSV model to HSCM (hubitat special color model).

Can I request a feature request that, in the future, habitat support standard color models? It isn't the biggest deal but just annoying to have to remember to convert hue degrees to your range whenever I enter a color.

You say it's a compatibility issue, are you saying your software can not take a number (range 0-360) as an input, divide by 360 and than round to the nearest integer?

That way users would enter values in the standard model and it wouldn't confuse users (which is a bad thing and why I had to spend time searching for this bizarre color answer in the first place).

1 Like

We inherited the hue thunking problem from another platform, it's currently maintained for backward compatibility reasons.

Not an expert in colors...

How do you convert HSV to Hubitat value (1-100 scale)?
Is there a magic formula to use?

Let see I want full blue hsl(240, 100%, 50%)
What should I enter as a value in Hubitat?

Thanks

@spgohome I have found that these values in HE are real close. Many colors are created in-between these numbers as noted.
1-33 are red (1), then orange (8), then yellow (15), up to green (33)
34-67 are green, cyan (45) up to blue (67)
68-100 blue, purple (75), back to red at 100

1 Like

Ok, but there must be a formula to, let say, convert 240(HSV model) to 60(HSCM hubitat special color model)...

@spgohome I found this. HSV/360 * 100 = HSCM

Rule of three...?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.