Editing Module:ContestantColor
Appearance
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 103: | Line 103: | ||
["Burgundy"]="800020", | ["Burgundy"]="800020", | ||
["Carmine"]="FF0040", | ["Carmine"]="FF0040", | ||
["Amaranth"]="E52B50 | ["Amaranth"]="E52B50" | ||
} | } | ||
return | return (f.args[2]~=nil and f.args[2] or "#")..(colors[p.nameMod(f.args[1]~=nil and f.args[1] or "")] or "000000") | ||
end | end | ||
function p.text(frame) | function p.text(frame) | ||
local f=frame~=nil and frame or {args={}} | local f=frame~=nil and frame or {args={}} | ||
local | local black={ --add contestants whose text colors should be black instead of white | ||
["Silver"]=1, | ["Silver"]=1, | ||
["Platinum"]=1, | ["Platinum"]=1, | ||
Line 123: | Line 121: | ||
["Gold"]=1, | ["Gold"]=1, | ||
["Amber"]=1, | ["Amber"]=1, | ||
["Yellow"]=1, | ["Yellow"]=1, | ||
["Lemon"]=1, | ["Lemon"]=1, | ||
Line 146: | Line 143: | ||
["Pearl"]=1, | ["Pearl"]=1, | ||
["Lilac"]=1, | ["Lilac"]=1, | ||
["Magenta"]=1, | |||
["Pink"]=1, | ["Pink"]=1, | ||
["Cerise"]=1, | ["Cerise"]=1, | ||
["Cotton Candy"]=1 | ["Cotton Candy"]=1 | ||
} | } | ||
return | return (black[p.nameMod(f.args[1]~=nil and f.args[1] or "")]~=nil and "black" or "white") | ||
end | end | ||
function p.nameMod(name) | function p.nameMod(name) | ||
if name=="Grey" then name="Gray" end | if name=="Grey" then name="Gray" end | ||
return name | return name | ||
end | end | ||
return p | return p |