Module:Element color

From Sandboxels Wiki
Jump to navigation Jump to search

Documentation for this module may be created at Module:Element color/doc

p = {}

p.getColor = function(frame)
	local source = "Module:Element color/"
	if frame.args[2] == nil then
		source = source .. "vanilla"
	else
		source = source .. frame.args[2]
	end
	
	-- load module
	elemList = require(source)
	local value = elemList[string.lower(frame.args[1])]
	if value == nil then -- placeholder color
		value = "#cccccc, #ffffff, #cccccc"
	end
	mw.log(value)
	return value
end

return p