Module:MCColor
text
local p = {} -- Load the MCColor/data table local data = mw.loadData('Module:MCColor/data') function p.main(frame) local args = frame.args local mccolor = args[1] -- Minecraft Color Code -- Check if the provided mccolor exists in the data table local MCColorData = data[mccolor] if not MCColorData then return '' -- Return an empty string if the color is not found end -- Return the colorcode return MCColorData.wikicolor or '' end return p