This commit is contained in:
2021-06-21 21:31:18 -05:00
commit c8d27e2763
4 changed files with 242 additions and 0 deletions

4
examples/rgbtoint.lua Normal file
View File

@@ -0,0 +1,4 @@
local function RGBAToInt(R, G, B, A)
A = A or 255
return ((tonumber(R)&0x0ff)<<0x00)|((tonumber(G)&0x0ff)<<0x08)|((tonumber(B)&0x0ff)<<0x10)|((tonumber(A)&0x0ff)<<0x18)
end