matplotlib.colors.to_hex#
- matplotlib.colors.to_hex(c, keep_alpha=False)[source]#
 Convert c to a hex color.
- Parameters:
 - ccolor or 
numpy.ma.masked - keep_alphabool, default: False
 If False, use the
#rrggbbformat, otherwise use#rrggbbaa.
- ccolor or 
 - Returns:
 - str
 #rrggbbor#rrggbbaahex color string