▶️
Planeshift.
Документацию для этого шаблона или модуля можно найти в Template:Color.
Вы можете быть перенаправлены на другой язык вики, если перевод недоступен.
Зависимости
local p = {}
local colors = mw.loadData('Модуль:Color/data')
local getArgs = require('Модуль:Arguments').getArgs
function p.main(frame)
local args = getArgs(frame, {
wrappers = {
'Шаблон:Цвет'
}
})
local success, result = pcall(p._main, args)
if success then
return mw.text.nowiki(result)
else
-- Returning an empty string to prevent old templates from breaking.
-- TODO: Update all templates.
return ''
end
end
function p._main(args)
assert(args[1], 'Нет ввода')
return colors[mw.ustring.lower(args[1])] or args[1]
end
return p