Module:Color contrast: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
fix
(fix)
(fix)
Line 122:
end
 
local function colors2ratiop._ratio(cargs)
local v1 = color2lum(c[1])
local v2 = color2lum(c[2])
Line 128:
return (v2 + 0.05)/(v1 + 0.05)
else
return args['error'] or '?'
end
end
Line 138:
function p.ratio(frame)
local args = frame.args[1] and frame.args or frame:getParent().args
localreturn r = colors2ratiop._ratio(args)
if (r ~= '') then
return r
else
return frame.args['error'] or frame:getParent().args['error'] or '?'
end
end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu