Module:AB2 rank colors

local getArgs = require('Module:Common').getArgs

-- HTML colors: https://www.w3.org/TR/css-color-3/#svg-color local HTMLColors = { ['vanilla'] = 'powderblue', ['bronze'] = 'darkgoldenrod', ['silver'] = 'silver', ['gold'] = 'gold', ['azure'] = 'slateblue', ['emerald'] = 'mediumseagreen', ['amethyst'] = 'plum', ['diamond'] = 'aquamarine', ['legendary'] = 'darkorange', }

local p = {}

p.getHTMLColor = function(frame) local args = getArgs(frame) local key = string.lower(args[1]) return HTMLColors[key] end

return p