มอดูล:Infobox road/color/ASIA

จากวิกิพีเดีย สารานุกรมเสรี
Documentation icon คู่มือการใช้งานมอดูล[สร้าง]
local p = {}

local colors = {}
function colors:color(args)
    local type = args.type
    local subtype = args.subtype
    subtype = subtype and string.lower(subtype) or ''
    local colorFunc = self[type]
    return colorFunc and colorFunc(subtype) or "background:#fff; border:1px solid #000;"
end

local function AH()
    return " background:#003f87; color:white;"
end
colors["AH"] = AH

p.colors = colors
return p