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 write 3 byte RGB value
#2
You can use hex value, like 0x0000FF for blue only.

Or specify color in 0..255 range like this:
Code:
r = 0
g = 0
b = 255

rgb = bit.bor(bit.lshift(r, 16), bit.lshift(g, 8), b)
Reply


Messages In This Thread
How to write 3 byte RGB value - by Mirco - 27.06.2017, 06:41
RE: How to write 3 byte RGB value - by admin - 27.06.2017, 06:56
RE: How to write 3 byte RGB value - by Mirco - 27.06.2017, 07:08

Forum Jump: