Notwendiges Modul für die Benutzung der Vorlage {{Marker}}


local mc = {}

mc.colorsByType = {
	around      = {'800080', 'in der Umgebung'},
	buy         = {'008080', 'Kaufen'},
	city        = {'0000FF', 'Stadt'},
	['do']      = {'808080', 'Aktivität'},
	drink       = {'000000', 'Ausgehen'},
	eat         = {'D2691E', 'Küche'},
	['error']   = {'FF00FF', 'Fehler'},
	go          = {'A52A2A', 'Anreise'},
	listing     = {'228B22', 'Auflistung'},
	other       = {'228B22', 'Anderes'},
	see         = {'4682B4', 'Sehenswürdigkeit'},
	sleep       = {'000080', 'Unterkunft'},
	target      = {'FFCCCC', 'Ziel'},
	vicinity    = {'800000', 'in der Nähe'},
	view        = {'4169E1', 'Aussicht'},

	black       = {'000000', 'schwarz'},
	blue        = {'0000FF', 'blau'},
	brown       = {'A52A2A', 'brown'},
	chocolate   = {'D2691E', 'schokoladenbraun'},
	forestgreen = {'228B22', 'waldgrün'},
	fuchsia     = {'FF00FF', 'purpurrot'},
	gold        = {'FFD700', 'gold'},
	gray        = {'808080', 'grau'},
	grey        = {'808080', 'grau'},
	lime        = {'00FF00', 'hellgrün'},
	magenta     = {'FF00FF', 'magentarot'},
	maroon      = {'800000', 'kastanienbraun'},
	mediumaquamarine = {'66CDAA', 'aquamarinblau'},
	navy        = {'000080', 'marineblau'},
	orange      = {'FFA500', 'orange'},
	plum        = {'DDA0DD', 'pflaumenblau'},
	purple      = {'800080', 'violett'},
	red         = {'FF0000', 'rot'},
	royalblue   = {'4169E1', 'königsblau'},
	silver      = {'C0C0C0', 'silber'},
	steelblue   = {'4682B4', 'stahlblau'},
	teal        = {'008080', 'blaugrün'},
}

function mc.getColor( aType )
	local c = mc.colorsByType[aType]
	if c then return c[1], aType
	else return mc.colorsByType['error'][1], 'error' end
end

function mc.getName( aType )
	local c = mc.colorsByType[aType]
	if c then return c[2]
	else return mc.colorsByType['error'][2] end
end

function mc.convert( frame )
	local r,_ = mc.getColor( frame.args[1] )
	return r
end

return mc