Color Bulbs and color value

What is the definition of color value when using colored bulbs? I would like to use 3300ff for a custom color but I cannot add this.

Our current drivers don't support hex colors in setColor currently. Set color currently takes a color map [hue:value,saturation:value,level:value]
Been thinking of adding hex support, lots of stuff to do...

1 Like

I can't be bothered to remember all of that stuff, so I made a userscript to make it easier to select the color I want.

So what exactly is this for?

You can get extensions for most browsers that allow you to write your own scripts to change behavior on any webpage. I used an extension called TamperMonkey (which should be available for Chrome, Firefox, Safari, etc.) to create a script to inject a color picking widget near COLOR_MAP fields. This widget will populate the [hue:X,saturation:Y,level:Z] for you.

I described the installation instructions here:

1 Like

@mike.maxwell

What do I need to add to a custom driver to have my SmartLife RGBW show up as Color Temperature Bulbs? Right now they only show up available as RGB bulbs. If I could add the capability segment into the device driver for temperature I can solve this issue I have.

The code for our Zigbee RGBW bulb is here:

You can use this as a capability and messaging model for your driver.

Next question is how do I set a color value? Or should I try doing something with the user script as another person mentioned?

The syntax for setting color is [hue:X,saturation:Y,level:Z] or just [hue:X,saturation:Y]. I believe each of X, Y, and Z is an integer value between 0 and 100. For example, [hue:65,saturation:100,level:100] is a nice blue color.

1 Like

How can I use these custom coding you have created?

The color value, which I assume is hue, goes from 0 to 360 on the rule, but on the device settings it goes from 0 to 100. Why the inconsistency? I can set the color I want on the device page but not in rule machine. Need a converter.