Anonymous user
Module:Color contrast: Difference between revisions
Jump to navigation
Jump to search
fix
(refactor to allow this to be called from another module) |
(fix) |
||
Line 122:
end
local function colors2ratio(
local v1 = color2lum(
local v2 = color2lum(
if (type(v1) == 'number' and type(v2) == 'number') then
return (v2 + 0.05)/(v1 + 0.05)
Line 137:
function p.ratio(frame)
local r = colors2ratio(args)
▲ frame.args[1] or frame:getParent().args[1],
if (r ~= '') then
return r
|