Jump to content

Module:Color contrast: Difference between revisions

typo
m>Frietjes
m>Frietjes
(typo)
Line 137: Line 137:
end
end
if (type(v1) == 'number' and type(v3) == 'number') then
if (type(v1) == 'number' and type(v3) == 'number') then
ratio1 = (v3 + 0.05)/(v1 + 0.05)
ratio2 = (v3 + 0.05)/(v1 + 0.05)
ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1
ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2
end
end
return (ratio1 + bias > ratio2) and c2 or c3
return (ratio1 + bias > ratio2) and c2 or c3
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.