Module:Color contrast: Difference between revisions

no edit summary
m>Frietjes
No edit summary
m>Frietjes
No edit summary
Line 99: Line 99:


-- split into rgb
-- split into rgb
local cs = mw.text.split(c, '')
local cs = mw.text.split(c or '', '')
if( #cs == 6 ) then
if( #cs == 6 ) then
local R = sRGB( (16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]))/255 )
local R = sRGB( (16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]))/255 )
Anonymous user