Christian-Me / node-red-contrib-ui-iro-color-picker

Node-RED dashboard color picker widget utilizing the iro.js library. Can be configured as a widget or modal popup window. Individual components can be combined,
Apache License 2.0
4 stars 3 forks source link

Possible issue with RGBW output from Hue picker #8

Closed crickes closed 2 years ago

crickes commented 2 years ago

I'm not sure if this is a bug or not but I noticed that when using the hue & saturation picker with output set to RGBW, the maximum value output for any or R, G, B or W, is 153. I would have expected this to be 255. The documentation seems to imply it should go up to 255.

'RGBW color object {r:255,g:255,b:255,w:255} usable for RGBW LEDs experimental feature'

Christian-Me commented 2 years ago

Hi,

sorry to answer so late. You know the holidays;)

The problem might be that if you are missing the brightness channel the brightness will stuck at the brightness of the initial color set or the last color received. If you select HSV or HSL you should get your selected H and S value,

Try to set the initial color to white, or send 255,255,255 as initial value. Or (much better) add the brightness control to complete the color model.

crickes commented 2 years ago

Hi,

Adding a brightness (value) slider worked. I now get up to 255 on each of the RGBW values being output.

This component is awesome by the way.

Christian-Me commented 2 years ago

Thank you for your positive feedback 🤩 Good to hear that it works now.

If you need to set the brightness from an external control you should be able to set it via

msg.saturation 0 - 100