Module:Infobox road/color/CAN

local p = {}

local colors = {} function colors:color(args) local headerType = args.headerType if headerType == "freeway" then return "background:#003F87; color:white;" end local province = args.province local type = args.type or '' if type == province then return "background:#006A4D; color:white;" end return self[type] or "background:#cedff2;" end

for i,type in pairs({"A", "Autoroute", "Fwy"}) do   colors[type] = "background:#003F87; color:white;" end

for i,type in pairs({"Hwy", "PTH", "Route", "Trunk", "Sec", "Secondary", "TCH"}) do   colors[type] = "background:#006A4D; color:white;" end

p.colors = colors return p