Module:Utilities: Difference between revisions

m Maintain output keys on expand_templates
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 111: Line 111:
local slot_colors = {
local slot_colors = {
["Weapon"] = {
["Weapon"] = {
hex = "c97a03",
hex = "c8761c",
rgb = "201,122,3",
rgb = "200, 118, 28",
hsl = "35,97%,40%",
hsl = "31, 75%, 45%",
cmyk = "0%,39%,98%,21%"
cmyk = "0%, 41%, 86%, 22%"
},
},
["Armor"] = {
["Armor"] = {
hex = "659818",
hex = "6f8724",
rgb = "101,152,24",
rgb = "198, 248, 114",
hsl = "82,73%,34%",
hsl = "82, 91%, 71%",
cmyk = "34%,0%,84%,40%"
cmyk = "20%, 0%, 54%, 3%"
},
},
["Tech"] = {
["Tech"] = {
hex = "c288f0", -- purple
hex = "ba5ca6",
rgb = "194,136,240",
rgb = "186, 92, 166",
hsl = "276,79%,74%",
hsl = "313, 41%, 55%",
cmyk = "19%,43%,0%,6%"
cmyk = "0%, 51%, 11%, 27%"
}
}


Line 264: Line 264:
     end
     end
     return result
     return result
end
-- Helper function
-- Returns true or false depending if the page exist
function p.page_exists(title_text)
    local title_obj = mw.title.new(title_text)
    return title_obj and title_obj.exists or false
end
end


return p
return p