Module:Color contrast: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
no edit summary
(Created page with '-- -- This module implements -- {{Color contrast ration}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local function sRGB ( v ) if (v <= 0.0392...')
 
No edit summary
Line 118:
 
function p.ratio(frame)
local v1 = color2numcolor2lum(frame.args[1] or frame:getParent().args[1])
local v2 = color2numcolor2lum(frame.args[2] or frame:getParent().args[2])
return (v2 + 0.05)/(v1 + 0.05)
end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu