Jump to content

Module:Color contrast: Difference between revisions

no edit summary
m>Frietjes
No edit summary
m>Frietjes
No edit summary
Line 72: Line 72:
local s = mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9]*[%s]*,[%s]*([0-9][0-9]*)%%[%s]*,[%s]*[0-9][0-9]*%%[%s]*%)$')
local s = mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9]*[%s]*,[%s]*([0-9][0-9]*)%%[%s]*,[%s]*[0-9][0-9]*%%[%s]*%)$')
local l = mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*%%[%s]*,[%s]*([0-9][0-9]*)%%[%s]*%)$')
local l = mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*%%[%s]*,[%s]*([0-9][0-9]*)%%[%s]*%)$')
return hsl2rgb(tonumber(h), tonumber(s)/100, tonumber(l)/100)
return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100)
   end
   end


Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.