Module:Rarity

-- Get the correct colour for a given rarity, described by the relevant tier.

local rarity = {}

local rarities = { [1] = "#fdfefe", [2] = "#27AE60", [3] = "#2471A3", [4] = "#7D3C98", [5] = "#f1c40f", [6] = "#D35400", [7] = "#7B241C", [8] = "#B3CA1F", [9] = "#dc2367" }

-- For those of you with an alternative 'colour' spelling...too bad! function rarity.colour(frame) local tier = tonumber(frame.args["tier"]) if (tier ~= nil) then return rarities[tier] else -- default to white, tier 1 return rarities[1] end end

return rarity