This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

How to use new datatype RGB-W
#4
(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
Reply


Messages In This Thread
How to use new datatype RGB-W - by gdimaria - 14.08.2020, 12:30
RE: How to use new datatype RGB-W - by Daniel - 14.08.2020, 12:57
RE: How to use new datatype RGB-W - by admin - 14.08.2020, 12:59
RE: How to use new datatype RGB-W - by gdimaria - 22.08.2020, 16:11
RE: How to use new datatype RGB-W - by admin - 25.08.2020, 11:38
RE: How to use new datatype RGB-W - by admin - 25.08.2020, 13:00
RE: How to use new datatype RGB-W - by Daniel - 25.08.2020, 15:57
RE: How to use new datatype RGB-W - by admin - 26.08.2020, 08:12
RE: How to use new datatype RGB-W - by Daniel - 26.08.2020, 08:12
RE: Urgent! - by gdimaria - 18.09.2020, 08:07
RE: How to use new datatype RGB-W - by Daniel - 18.09.2020, 08:09
RE: How to use new datatype RGB-W - by admin - 18.09.2020, 08:12
RE: How to use new datatype RGB-W - by Daniel - 22.09.2020, 13:52
RE: How to use new datatype RGB-W - by Daniel - 22.09.2020, 15:20
RE: How to use new datatype RGB-W - by Daniel - 23.09.2020, 07:55
RE: How to use new datatype RGB-W - by Daniel - 23.09.2020, 08:18
RE: How to use new datatype RGB-W - by Daniel - 24.09.2020, 08:44

Forum Jump: