Jump to content

Editing Module:ContestantColor

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 2: Line 2:
function p.color(frame)
function p.color(frame)
local f=frame~=nil and frame or {args={}}
local f=frame~=nil and frame or {args={}}
local colors={ --add contestant colors here
local colors={
["Black"]="000000",
["Black"]="000000",
["Shadow"]="3F3F3F",
["Shadow"]="3F3F3F",
Line 103: Line 103:
["Burgundy"]="800020",
["Burgundy"]="800020",
["Carmine"]="FF0040",
["Carmine"]="FF0040",
["Amaranth"]="E52B50",
["Amaranth"]="E52B50"
["Monochrome"]="linear-gradient(90deg,#000,#FFF)",
["Rainbow"]="linear-gradient(90deg,#F00,#FF0,#0F0,#0FF,#00F,#F0F,#F00)"
}
}
return (p.autoHex({args={f.args[1]}}) and (f.args[2]~=nil and f.args[2] or "#") or "")..(colors[p.nameMod(f.args[1]~=nil and f.args[1] or "")] or "000000")
local a=f.args[1]~=nil and f.args[1] or ""
end
if a=="Grey" then a="Gray" end
 
function p.text(frame)
local f=frame~=nil and frame or {args={}}
local modif={ --1=black, 2=white with black outline, 3=black with white outline
["Silver"]=1,
["Platinum"]=1,
["White"]=1,
["Salmon"]=1,
["Coral"]=1,
["Apricot"]=1,
["Peach"]=1,
["Gold"]=1,
["Amber"]=1,
["Olivine"]=1,
["Yellow"]=1,
["Lemon"]=1,
["Cream"]=1,
["Ivory"]=1,
["Beige"]=1,
["Dandelion"]=1,
["Chartreuse"]=1,
["Nyanza"]=1,
["Lime"]=1,
["Spring"]=1,
["Mint"]=1,
["Turquoise"]=1,
["Cyan"]=1,
["Ice"]=1,
["Snow"]=1,
["Diamond"]=1,
["Capri"]=1,
["Cloud"]=1,
["Periwinkle"]=1,
["Alpine"]=1,
["Pearl"]=1,
["Lilac"]=1,
["Pink"]=1,
["Cerise"]=1,
["Cotton Candy"]=1,
["Rainbow"]=2
}
local res={
"#000",
"#FFF;text-shadow:-1px -1px 1px #000,1px -1px 1px #000,-1px 1px 1px #000,1px 1px 1px #000",
"#000;text-shadow:-1px -1px 1px #FFF,1px -1px 1px #FFF,-1px 1px 1px #FFF,1px 1px 1px #FFF"
}
return res[modif[p.nameMod(f.args[1]) or ""]] or "#FFF"
end
 
function p.autoHex(frame)
local noHex={
["Monochrome"]=1,
["Rainbow"]=1
}
return noHex[p.nameMod(frame.args[1])]==nil
end
 
function p.nameMod(name)
if name=="Grey" then name="Gray" end
if name=="Mono" then name="Monochrome" end
return name
return (f.args[2]~=nil and f.args[2] or "#")..(colors[a] or "000000")
end
end
return p
return p
Please note that all contributions to Keynotathlon Wiki are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) (see Keynotathlon Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page:

Cookies help us deliver our services. By using our services, you agree to our use of cookies.