Looking for RGB resources for efficiency indicator

I have a variable set to take whole house power and subtract our baseline. I then came up with the idea of linking that to a virtual RGB bulb. Now, on a dashboard I can use the color to indicate energy efficiency (after setting the icon to the leaf, of course :wink:)

Are there any good sources for a list of values to use for the rule? I expect I will have a long list of RGB values to set the virtual device to based on variable.

Would it be better if I do it by hue?

On Hubitat you'll normally use HSV/HSB for color, not RGB. The virtual RGB(W) bulb driver works this way, for one. You'll probably have better luck Googling this color model compared to anything I can explain here but the main thing to know is that Hubitat's hue model (the "H" in "HSV") goes 0-100 by default, not 0-360 like you'll normally find. Saturation is also 0-100, as is brightness/value (which is the level attribute on Hubitat, but this is not to be confused with the different HSL color model).

In this model, hue is a circle, with the numbers being 0-100% around this circle. Both extemes (0 and 100) are red; the rest fills in in rainbow order: red, orange, green, etc. If you want a "true" color, saturations near or close to 100 are probably what you want (0 is theoretically white, and you'll get more pastel the lower you go).

If you feel more comfortable with the RGB model, conversion between the two models is reliable. You can find lots of calculators online (and formula if you want to do it yourself). Some apps, including Rule Machine, will also offer you "pre-built" color options in the UI, like "red," that are intended to eliminate the need for you to know any of this at all (what these mean would be something specific to each app). If those don't get you where you want or if you'd rather do it on your own anyway, hopefully the above helps!

1 Like

This is extremely helpful actually! I think I can simply break down values into nice even numbers and then use hue values by themselves and work my way through the scale between red and green.