multicolorfits.to_hex#

multicolorfits.to_hex(c, keep_alpha=False)[source]#

Convert c to a hex color.

Parameters:
  • c (color or numpy.ma.masked)

  • keep_alpha (bool, default: False) – If False, use the #rrggbb format, otherwise use #rrggbbaa.

Returns:

str#rrggbb or #rrggbbaa hex color string