matplotlib.colors.
to_hex
Convert c to a hex color.
c
Uses the #rrggbb format if keep_alpha is False (the default), #rrggbbaa otherwise.
keep_alpha
#rrggbbaa