[dismiss]
Welcome to SmashWiki! Log in or create an account and join the community, and don't forget to read this first! |
Notices |
---|
The Skill parameter has been removed from Smasher infoboxes, and in its place are the new "Best historical ranking" and "Best tournament result" parameters. SmashWiki needs help adding these new parameters to Smasher infoboxes, refer to the guidelines here for what should be included in these new parameters. |
When adding results to Smasher pages, include each tournament's entrant number in addition to the player's placement, and use the {{Trn}} template with the matching game specified. Please also fix old results on Smasher pages that do not abide to this standard. Refer to our Smasher article guidelines to see how results tables should be formatted. |
Check out our project page for ongoing projects that SmashWiki needs help with. |
Module:TierColour
From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
Documentation for this module may be created at Module:TierColour/doc
local tierColours = mw.loadData("Module:TierColour/data")
local tierColouriser = {}
function tierColouriser.getColour(frame)
colourCount = int(frame.args[1])
thisTier = int(frame.args[2])
style = frame.args[3]
targetColour = tierColours[colourCount][thisTier]
if targetColour == nil then
targetColour = {127, 127, 127}
end
lighten = 0
if style == "header" then
lighten = 0.75
elseif style == "cell" then
lighten = 0.5
end
targetColour[0] = targetColour[0] * (1 - lighten) + 255 * lighten
targetColour[1] = targetColour[1] * (1 - lighten) + 255 * lighten
targetColour[2] = targetColour[2] * (1 - lighten) + 255 * lighten
return result
end
return tierColouriser