Content deleted Content added
Jackmcbarn (talk | contribs) rm unnecessary function |
Jackmcbarn (talk | contribs) rm unnecessary string.lower() and unnecessary "or ''"s |
||
Line 17:
end
local function color2lum( origc )
local c = mw.text.trim(origc
-- remove leading # (if there is one)
c = mw.ustring.match(c, '^[#]*([
-- split into rgb
local cs = mw.text.split(c
if( #cs == 6 ) then
local R = sRGB( (16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]))/255 )
|