Module:Color contrast: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
better error checking |
No edit summary |
||
Line 161: | Line 161: | ||
k = k or '' |
k = k or '' |
||
v = v or '' |
v = v or '' |
||
if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background-color)[%s]*$')) then |
if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then |
||
local lum = color2lum(v) |
local lum = color2lum(v) |
||
if( lum ~= '' ) then bg, lum_bg = v, lum end |
if( lum ~= '' ) then bg, lum_bg = v, lum end |