def textListToColorsSimple(names):
	'''
	Generates a list of colors based on a list of names (strings). Similar strings correspond to similar colors. 
	'''
	uNames = list(set(names))
	uNames.sort()
	textToColor = [ uNames.index(n) for n in names ]
	textToColor = np.array(textToColor)
	textToColor = 255 * (textToColor.min() - textToColor) / (textToColor.max() - textToColor.min())
	textmaps = generateColorMap();
	colors = [textmaps[int(c)] for c in textToColor]
	
	# colors = [c for (n, c) in sorted(zip(names, colors))]

	return colors
dataset/ETHPy150Open tyiannak/pyAudioAnalysis/audioVisualization.py/textListToColorsSimple/swapped operands of `-`