tools.get_hex

tools.get_hex(pal, n=None)[source]

Convert rgb colour code to hex code.

Parameters:
  • pal (str) – Accepts palette accepted by matplotlib.pyplot.get_cmap.

  • n (Optional[int], optional) – Number of colours to return.

Returns:

List of hex colours.

Return type:

List