League of Legends Wiki

Want to contribute to this wiki?
Sign up for an account, and get started!
You can even turn off ads in your preferences.

Come join the LoL Wiki community Discord server!

READ MORE

League of Legends Wiki
No edit summary
(new color for Lethality on PBE)
Line 20: Line 20:
 
{"attack speed", "#C80000"},
 
{"attack speed", "#C80000"},
 
{"armor", "#EFF002"},
 
{"armor", "#EFF002"},
{"lethality", "#EFF002"},
+
{"lethality", "#DA523D"},
 
{"magic resist", "#CA1F7B"},
 
{"magic resist", "#CA1F7B"},
 
{"mr", "#CA1F7B"},
 
{"mr", "#CA1F7B"},

Revision as of 20:45, 24 October 2018

Documentation for this module may be created at Module:Color/doc

-- <pre>
-- Used by [[Template:Keyword color]] and [[Template:Skin tier]]
local p = {}
local lib = require('Module:Feature')
 
local keywordcolor = {
    {"health",                "#C03300"},
    {"hp",                    "#C03300"},
    {"attack damage",         "#FC8A01"},
    {"attack's damage",       "#FC8A01"},
    {"ad",                    "#FC8A01"},
    {"physical damage",       "#BC6032"},
    {"pd",                    "#BC6032"},
    {"ability power",         "#97FC97"},
    {"ap",                    "#97FC97"},
    {"magic damage",          "#9AFFF7"},
    {"md",                    "#9AFFF7"},
    {"true damage",           "#F9966B"}, -- used to dodge percent
    {"td",                    "#F9966B"},    
    {"attack speed",          "#C80000"},
    {"armor",                 "#EFF002"},
    {"lethality",             "#DA523D"},
    {"magic resist",          "#CA1F7B"},
    {"mr",                    "#CA1F7B"},
    {"magic penetration",     "#CA1F7B"},
    {"resist",                "#E46E9D"},
    {"mana",                  "#0099CC"},
    {"energy",                "#FFFF00"},
    {"critical strike chance","#E56013"},
    {"critical chance",       "#E56013"},
    {"critical strike damage","#944B00"},
    {"critical damage",       "#944B00"},
    {"crit",                  "#944B00"},    
    {"movement speed",        "#F5EE99"},
    {"ms",                    "#F5EE99"},
    {"xp",                    "#883FD1"},
    {"gold",                  "#FFD700"},
    {"siphoning strike",      "#5C58C9"},
    {"buzzword3",             "#E34D4C"},
    {"buzzword2",             "#56C456"},
    {"buzzword",              "#A01D7A"}
}

local skincolor = {
    {"ultimate",              "#FFA500"}, -- orange
    {"3250",                  "#FFA500"}, -- orange
    {"2775",                  "#FFA500"}, -- orange
    {"legendary",             "#FF3232"},
    {"1820",                  "#FF3232"},
    {"loot",                  "#7943ED"},
    {"gem",                   "#7943ED"},
    {"mythic",                "#7943ED"},
    {"2450",                  "#7943ED"},
    {"10",                    "#7943ED"},
    {"epic",                  "#00C8FF"},
    {"1350",                  "#00C8FF"},
    {"standard",              "#228B22"}, -- forestgreen
    {"superior",              "#228B22"}, -- forestgreen
    {"975",                   "#228B22"}, -- forestgreen
    {"budget",                "#FFFFFF"}, -- white
    {"deluxe",                "#FFFFFF"}, -- white
    {"750",                   "#FFFFFF"}, -- white
    {"classic",               "#808080"}, -- grey
    {"timeworn",              "#808080"}, -- grey
    {"520",                   "#808080"}, -- grey
    {"460",                   "#808080"}, -- grey
    {"390",                   "#808080"}, -- grey
    {"chroma",                "#FFFFFF"}, -- white
    {"290",                   "#FFFFFF"}, -- white
    {"195",                   "#FFFFFF"}  -- white
}

function p.keyword(frame)
    local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
 
    for i,color in ipairs(keywordcolor) do 
        result = mw.ustring.find(mw.ustring.lower(args[1]), color[1])
        if result ~= nil then
            return color[2]
        end
    end
    return "inherit"
end
 
function p.skin(frame)
    local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
 
    for i,color in ipairs(skincolor) 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]]