La documentazione per questo modulo può essere creata in Modulo:KeywordColor/man

-- <pre>
local p = {}
local lib = require('Module:Feature')

local colordata = {
    {"health",                "#C03300"},
    {"hp",                    "#C03300"},
    {"attack damage",         "#FC8A01"},
    {"attack's damage",       "#FC8A01"},
    {"ad",                    "#FC8A01"},
    {"physical damage",       "#FC8A01"},
    {"ability power",         "#97FC97"},
    {"ap",                    "#97FC97"},
    {"magic damage",          "#97FC97"},
    {"true damage",           "#F9966B"}, -- used to dodge percent
    {"attack speed",          "#C80000"},
    {"armor",                 "#EFF002"},
    {"lethality",             "#EFF002"},
    {"magic resist",          "#CA1F7B"},
    {"mr",                    "#CA1F7B"},
    {"resist",                "#E46E9D"},
    {"mana",                  "#0099CC"},
    {"energy",                "#FFFF00"},
    {"critical strike chance","#E56013"},
    {"critical chance",       "#E56013"},
    {"critical strike damage","#944B00"},
    {"critical damage",       "#944B00"},
    {"movement speed",        "#F5EE99"},
    {"ms",                    "#F5EE99"},
    {"xp",                    "#883FD1"},
    {"gold",                  "#FFD700"},
    {"siphoning strike",      "#5C58C9"},
    {"buzzword3",             "#E34D4C"},
    {"buzzword2",             "#56C456"},
    {"buzzword",              "#A01D7A"}
}

function p.main(frame)
    local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
    
    for i,color in ipairs(colordata) do 
        result = mw.ustring.find(mw.ustring.lower(args[1]), color[1])
        if result ~= nil then
            return color[2]
        end
    end
    return "inherit"
end

return p

-- </pre>
-- [[Category:Lua]]
I contenuti della comunità sono disponibili sotto la licenza CC-BY-SA a meno che non sia diversamente specificato.