Module:College color/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 234:
(colors[3] or colors[2] or 'FFFFFF'):upper()
-- now pick a font color
local fontcolor = '000000'
-- compute the luminosity of the background
local lum = color2lum(background)
Line 242:
-- select the text color with the best contrast
if( bcontrast > wcontrast + 1.25 ) then
fontcolor = '#000000'
else
fontcolor = '#FFFFFF'
end
local s = 'background-color:#' .. background .. ';color:#' .. (args['color'] or fontcolor) .. ';'
if borderwidth > 0 then
local bc = (ctype == 'p') and