Module:College color/sandbox: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
rm unnecessary string.lower() and unnecessary "or ''"s
Jackmcbarn (talk | contribs)
rm unnecessary call to mw.text.trim
Line 17:
end
local function color2lum( origc )
local c = mw.text.trim(origc)
 
-- remove leading # (if there is one)
local c = mw.ustring.match(corigc, '^%s*[#]*([A-Fa-f0-9]*)%s*$')
-- split into rgb