Module:College color/sandbox: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
rm unnecessary call to mw.text.trim
Jackmcbarn (talk | contribs)
tighten up the regex and avoid ustring
Line 18:
local function color2lum( origc )
-- remove leading # (if there is one)
local c = mw.ustring.origc:match(origc, '^%s*[#]*?([A-Fa-f0-9]*+)%s*$')
-- split into rgb