Module:Color

local p = {}

local data = mw.loadData("Module:Color/Data")

function p.Main(frame) local args = frame:getParent.args return p.color(args[1], args[2]) end

function p.color(colorId, text) local colorClass = string.lower(string.gsub(colorId, " ", "-")) local html = mw.html.create("span") :addClass("colored-text") :addClass(colorClass) :wikitext(text) return tostring(html) end

return p