Documentation for this module may be created at Module:Color/doc
-- This module is invoked by Template:Color.
local color = {
colorByGame = {
fe1 = '#4682b4',
fe2 = '#3cb371',
fe3 = '#00008b',
fe4 = '#a0522d',
fe5 = '#d2691e',
fe6 = '#b0e0de',
fe7 = '#dc1430',
fe8 = '#9be2bb',
fe9 = '#448445',
fe10 = '#458565',
fe11 = '#09419c',
fe12 = '#b0c4de',
fe13 = '#add8e6',
fe14 = '#e8bcd7',
fe15 = '#65d899',
fe16 = '#9370DB',
feh = '#fef87d',
few = '#246f84',
ts = '#8b008b',
ts2 = '#e6e65c',
smt = '#9dff26',
tms = '#9dff26',
['wiki bg'] = '#00124b',
['wiki heading'] = '#ffe37b',
['wiki box'] = '#000d34'
}
}
function color.getColor(frame)
local arg = frame.args[1]
arg = type(tonumber(arg)) == 'number'
and 'fe'..arg
or string.lower(arg)
if arg == '' or color.colorByGame[arg] == nil then
return mw.html.create('span')
:css('color', 'red')
:wikitext('Invalid game input. Check out the documentation at [[Template:Color]]')
else
return mw.text.nowiki(color.colorByGame[arg])
end
end
return color
--[[Category:Modules]]
Community content is available under CC-BY-SA unless otherwise noted.