Module:TableColor

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) local part = args[1] local color = args[2] or "default"

--border exbel=31a44c|winden=4AAFC8|tanren=7e8b0f|undercity=562951|archford=0c5124|404D86 --background exbel=96D85A|winden=88D0E8|tanren=9fbf38|undercity=7d577d|archford=33A634|5f72c1 --row exbel=DAF1C5|winden=FBFEFD|tanren=EDF1C3|undercity=C8C1C6|archford=BDE8A6|D6E1EF --header exbel=B0F078|winden=D4E8F4|tanren=cad854|undercity=907a94|archford=60CA42|89a9d1

local hex = { ["border"] = { ["exbel"] = "31a44c", ["winden"] = "4AAFC8", ["tanren"] = "7e8b0f", ["undercity"] = "562951", ["archford"] = "0c5124", ["default"] = "404D86" },			["background"] = { ["exbel"] = "96D85A", ["winden"] = "88D0E8", ["tanren"] = "9fbf38", ["undercity"] = "7d577d", ["archford"] = "33A634", ["default"] = "5f72c1" },			["row"] = { ["exbel"] = "DAF1C5", ["winden"] = "FBFEFD", ["tanren"] = "EDF1C3", ["undercity"] = "C8C1C6", ["archford"] = "BDE8A6", ["default"] = "D6E1EF" },			["header"] = { ["exbel"] = "B0F078", ["winden"] = "D4E8F4", ["tanren"] = "cad854", ["undercity"] = "907a94", ["archford"] = "60CA42", ["default"] = "89a9d1" }		}

if part then part = string.lower(part) end

if color then color = string.lower(color) end

return hex[part][color] end

return p