Takes a hex string (must be 6 char long!) and converts it to a RGB percent set (0.0-1.0) local function HexToRGBPerc(hex) local rhex, ghex, bhex = string.sub(hex, 1, 2), string.sub(hex, 3, 4), string.sub(hex, 5, 6) return tonumber(rhex, 16)/255, tonumber(ghex, 16)/255, tonumber(bhex, 16)/255 end
| Attributes | Values |
|---|
| rdfs:label
| |
| rdfs:comment
| - Takes a hex string (must be 6 char long!) and converts it to a RGB percent set (0.0-1.0) local function HexToRGBPerc(hex) local rhex, ghex, bhex = string.sub(hex, 1, 2), string.sub(hex, 3, 4), string.sub(hex, 5, 6) return tonumber(rhex, 16)/255, tonumber(ghex, 16)/255, tonumber(bhex, 16)/255 end
|
| dbkwik:wowwiki/pro...iPageUsesTemplate
| |
| abstract
| - Takes a hex string (must be 6 char long!) and converts it to a RGB percent set (0.0-1.0) local function HexToRGBPerc(hex) local rhex, ghex, bhex = string.sub(hex, 1, 2), string.sub(hex, 3, 4), string.sub(hex, 5, 6) return tonumber(rhex, 16)/255, tonumber(ghex, 16)/255, tonumber(bhex, 16)/255 end
|