22.08.2020, 16:11
(14.08.2020, 12:59)admin Wrote: Which browser are you using? The slider is not displayed correctly. Are you using zoom/scaling?
Chrome without any scaling... same on Firefox and Edge.
I just want to let the user to click on RGB-W icon to set it.
On the other side I would like to update the value when I set it with a script.
That's a ordinary conversion I do with a script for a RGB:
Write to RGB
----------------
Red = bit.rshift(bit.band(value, 0xFF0000), 16)
Green = bit.rshift(bit.band(value, 0xFF00), 8)
Blue = bit.band(value, 0xFF)
grp.write(redGroup, Red, dt.uint8)
grp.write(greenGroup, Green, dt.uint8)
grp.write(blueGroup, Blue, dt.uint8)
Read RGB
------------
red = grp.find(redGroup)
green = grp.find(greenGroup)
blue = grp.find(blueGroup)
redHex = red.datahex
greenHex = green.datahex
blueHex = blue.datahex
RGB = lmcore.hextoint(redHex..greenHex..blueHex)
grp.update(rgbGroup, RGB)
Now how I a can do the same with a RGB-W object, which is made up of 4 scale % objects: RED - GREEN - BLU - WHITE?
Thanks.
Peppe