Module:Infobox road/color/CAN
MyWikiBiz, Author Your Legacy — Friday November 22, 2024
< Module:Infobox road | color
Jump to navigationJump to searchDocumentation for this module may be created at Module:Infobox road/color/CAN/doc
local p = {} local colors = {} function colors:color(args) local headerType = args.headerType if headerType == "freeway" then return "background:#003F87; color:#fff;" end local province = args.province local type = args.type or '' if type == province then return "background:#006A4D; color:#fff;" end return self[type] or "background:#cedff2;" end for i,type in pairs({"A", "Autoroute", "ATCH", "Fwy", "Toronto"}) do colors[type] = "background:#003F87; color:#fff;" end for i,type in pairs({"Hwy", "PR", "PTH", "Route", "Trunk", "Sec", "Secondary", "TCH", "Parkway"}) do colors[type] = "background:#006A4D; color:#fff;" end for i,type in pairs({"QC OLD"}) do colors[type] = "background:#AAA;" end p.colors = colors return p