Is there a function to return all single letter colors in Matplotlib?
The built in colors are available via matplotlib.colors.ColorConverter.colors
>>> print(matplotlib.colors.ColorConverter.colors)
{u'b': (0.0, 0.0, 1.0),
u'c': (0.0, 0.75, 0.75),
u'g': (0.0, 0.5, 0.0),
u'k': (0.0, 0.0, 0.0),
u'm': (0.75, 0, 0.75),
u'r': (1.0, 0.0, 0.0),
u'w': (1.0, 1.0, 1.0),
u'y': (0.75, 0.75, 0)}
It seems that the @Andy's answer returns all available colors with varying color names.
to get single color letters only you can use the following:
>>> [x for x in matplotlib.colors.ColorConverter.colors.keys() if len(x)==1]