Jump to content

Module:ContestantColor

From Keynotathlon Wiki
Revision as of 20:55, 20 August 2025 by MisterChuChu (talk | contribs) (Returns a contestant's corresponding hex color code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:ContestantColor/doc

p={}
function p.color(frame)
	local f=frame~=nil and frame or {args={}}
	local colors={
		["Black"]="000000",
		["Shadow"]="3F3F3F",
		["Gray"]="7F7F7F",
		["Silver"]="BFBFBF",
		["Platinum"]="DFDFDF",
		["White"]="FFFFFF",
		["Blood"]="3F0000",
		["Maroon"]="7F0000",
		["Crimson"]="BF0000",
		["Red"]="FF0000",
		["Strawberry"]="FF3F3F",
		["Salmon"]="FF7F7F",
		["Vermillion"]="E34234",
		["Brick"]="BC4A3C",
		["Scarlet"]="FF3F00",
		["Coral"]="FF7F50",
		["Flame"]="E25822",
		["Zinnwaldite"]="2C1608",
		["Apricot"]="FBCEB1",
		["Copper"]="B87333",
		["Chocolate"]="3F1F00",
		["Brown"]="7F3F00",
		["Tawny"]="806040",
		["Tan"]="C09060",
		["Bronze"]="CC6600",
		["Orange"]="FF7F00",
		["Peach"]="FFBF7F",
		["Khaki"]="C3B091",
		["Goldenrod"]="CF8F00",
		["Gold"]="FFBF00",
		["Amber"]="E8BE14",
		["Olive"]="7F7F00",
		["Olivine"]="BFBF00",
		["Yellow"]="FFFF00",
		["Lemon"]="FFFF3F",
		["Cream"]="FFFF7F",
		["Ivory"]="FFFFBF",
		["Beige"]="F5F5DC",
		["Dandelion"]="BFFF00",
		["Grass"]="3F7F00",
		["Chartreuse"]="7FFF00",
		["Ebony"]="555050",
		["Nyanza"]="E9FFDB",
		["Forest"]="003F00",
		["Green"]="007F00",
		["Clover"]="00BF00",
		["Lime"]="00FF00",
		["Spring"]="7FFF7F",
		["Moss"]="4C7450",
		["Xanadu"]="738678",
		["Emerald"]="50C878",
		["Mint"]="3FFF7F",
		["Shamrock"]="009E60",
		["Sea"]="009E60",
		["Turquoise"]="00FFBF",
		["Teal"]="007F7F",
		["Aqua"]="00BFBF",
		["Cyan"]="00FFFF",
		["Ice"]="7FFFFF",
		["Snow"]="DFFFFF",
		["Diamond"]="B9F2FF",
		["Capri"]="00BFFF",
		["Cloud"]="80DFFF",
		["Cerulean"]="007BA7",
		["Night Sky"]="003F7F",
		["Slate"]="708090",
		["Sky"]="007FFF",
		["Cobalt"]="0047AB",
		["Sapphire"]="082567",
		["Royal Blue"]="4169E1",
		["Azure"]="003FFF",
		["Midnight"]="00003F",
		["Navy"]="00007F",
		["Blue"]="0000FF",
		["Periwinkle"]="7F7FFF",
		["Ultramarine"]="3F00FF",
		["Indigo"]="3F007F",
		["Purple"]="5F00BF",
		["Lavender"]="7F00FF",
		["Amethyst"]="9966CC",
		["Alpine"]="BF7FFF",
		["Pearl"]="EFDFFF",
		["Lilac"]="CB94F7",
		["Violet"]="BF00FF",
		["Plum"]="7F007F",
		["Fuchsia"]="BF00BF",
		["Magenta"]="FF00FF",
		["Pink"]="FF7FFF",
		["Orchid"]="DA70D6",
		["Eggplant"]="610051",
		["Cerise"]="F504C9",
		["Quartz"]="51484F",
		["Raspberry"]="7F003F",
		["Rose"]="FF007F",
		["Telemagenta"]="CF3476",
		["Cotton Candy"]="FFBCD9",
		["Ruby"]="E0115F",
		["Mauve"]="915F6D",
		["Burgundy"]="800020",
		["Carmine"]="FF0040",
		["Amaranth"]="E52B50"
	}
	
	local a=f.args[1]~=nil and f.args[1] or ""
	if a=="Grey" then a="Gray" end
	
	return (f.args[2]~=nil and f.args[2] or "#")..(colors[a] or "000000")
end
return p
Cookies help us deliver our services. By using our services, you agree to our use of cookies.