I learnt of matplotlib.pyplot.colors that the basic built-in colors can be represented as a single letter.
Is there a function in Matplotlib to return those colors?
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)}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With