模組:Class
外观
require('Module:No globals')
local getArgs = require('Module:Arguments').getArgs
local p = {}
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
function p._main(args)
-- Main module code goes here.
local input = string.lower(args.color)
for _, v in ipairs(class) do
if input == v.code then
return v.color
elseif input == v.name then
return v.color
else
for _, w in ipairs(v.alias) do
if input == w then
return w
end
end
end
end
return class[#class].color
end
return p