Module:TierColour/data
From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
Documentation for this module may be created at Module:TierColour/data/doc
local RED = {255,0,0}
local ORG = {255,127,0}
local YLW = {255,255,0}
local CHR = {127,255,0}
local GRN = {0,255,0}
local AQU = {0,255,127}
local CYN = {0,255,255}
local AZR = {0,127,255}
local BLU = {0,0,255}
local VIO = {127,0,255}
local MGN = {255,0,255}
local PRP = {127,0,127}
function col_avg(...)
newCol = {0,0,0}
for i,v in ipairs(arg) do
newCol[1] = newCol[1] + v[1]
newCol[2] = newCol[2] + v[2]
newCol[3] = newCol[3] + v[3]
end
newCol[1] = newCol[1] / arg[n]
newCol[2] = newCol[2] / arg[n]
newCol[3] = newCol[3] / arg[n]
return newCol
end
local tierColourList = {
[4] = {RED, YLW, GRN, BLU},
[5] = {RED, ORG, YLW, GRN, BLU},
[6] = {RED, ORG, YLW, GRN, BLU, PRP},
}
return tierColourList