23.08.2020, 10:02
Hi,
Use this for 4 byte RGBW:
BR,
Erwin
Use this for 4 byte RGBW:
Code:
value = event.getvalue()
-- Split
R = bit.rshift(bit.band(value,0xff000000),24)
G = bit.rshift(bit.band(value,0x00ff0000),16)
B = bit.rshift(bit.band(value,0x0000ff00),8)
W = bit.band(value,0x000000ff)
-- Merge
RGBW = R * 0x1000000 + G * 0x10000 + B * 0x100 + W
Erwin