Skip to content

Instantly share code, notes, and snippets.

View Rimmuru's full-sized avatar

Rimuru Rimmuru

View GitHub Profile
@jasonbradley
jasonbradley / gist:4357406
Created December 22, 2012 03:47
Lua convert HEX to RGB
function Util:hex2rgb(hex)
hex = hex:gsub("#","")
return tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6))
end