Jump to content

Module:Infobox road/color/CAN

Unchecked
From Wikipedia

Documentation 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:white;"
    end
    local province = args.province
    local type = args.type
    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