Module:Utilities: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m get_slot_color prepare to handle more than just hex format
Sur (talk | contribs)
m fix color_format arg for get_slot_color
Line 107: Line 107:
["Tech"] = "8b56b4" --purple/pink
["Tech"] = "8b56b4" --purple/pink
}
}
function p.get_slot_color(slot)
function p.get_slot_color(slot, color_format)
if type(slot) == 'table' and slot.args then
if type(slot) == 'table' and slot.args then
frame = slot
frame = slot
slot = frame.args[1]
slot = frame.args[1]
end
end
local color_format = frame.args[2]
if color_format == nil then  
if color_format == nil then  
color_format = "hex"
color_format = "hex"