def textListToColorsSimple(names):
 uNames = list(set(names))
 uNames.sort()
 textToColor = [uNames.index(n) for n in names]
 textToColor = np.array(textToColor)
 textToColor = ((255 * (textToColor - textToColor.min())) / (textToColor.max() - textToColor.min()))
 textmaps = generateColorMap()
 colors = [textmaps[int(c)] for c in textToColor]
 return colors

def textListToColorsSimple ( names ) : uNames = list ( set ( names ) ) uNames . sort ( ) textToColor = [ uNames . index ( n ) for n in names ] textToColor = np . array ( textToColor ) textToColor = ( ( 255 * ( textToColor - textToColor . min ( ) ) ) / ( textToColor . max ( ) - textToColor . min ( ) ) ) textmaps = generateColorMap ( ) colors = [ textmaps [ int ( c ) ] for c in textToColor ] return colors
generates a list of colors based on a list of names .