I know this list of colors that matplotlib supports:
https://pythonhosted.org/ete2/reference/reference_svgcolors.html
Is there a programmatic way to convert these names to hex?
I need a function that gets the name of a color and returns the hexadecimal value of that color.
Thank.
matplotlib.colors.cnames - a dictionary of all matplotlib colors and their hexadecimal values:
matplotlib.colors.cnames
import matplotlib print matplotlib.colors.cnames["blue"] --> u'#0000FF'