I have a file where colors were stored as decimal integers
To get the r, g, b I divide the integer by 1, 256, or 65536 then take the low byte by bitwise and-ing with &hFF
r = bitwiseand( thecol , 255)
g = bitwiseand(thecol / 256,255)
b = bitwiseand(thecol/65536,255)
Is there an equivalent in Lua?
eg from a decimal value that is &h13F be able to get the decimal equivalent of the 3F part?