Editing Module:Color contrast
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 166: | Line 166: | ||
local v2 = color2lum(args[2]) | local v2 = color2lum(args[2]) | ||
if (type(v1) == 'number' and type(v2) == 'number') then | if (type(v1) == 'number' and type(v2) == 'number') then | ||
return (v2 + 0.05)/(v1 + 0.05) | |||
return ( | |||
else | else | ||
return args['error'] or '?' | return args['error'] or '?' |