class_docstr: Set the color palette in a with statement, otherwise be a list.
docstr: Return a color palette with hex codes instead of RGB values.
docstr_tok: ["Return","a","color","palette","with","hex","codes","instead","of","RGB","values","."]
code: def as_hex(self):
      """Return a color palette with hex codes instead of RGB values."""
      hex = [mpl.colors.rgb2hex(rgb) for rgb in self]
      return _ColorPalette(hex)
  
imports: import colorsys
  from itertools import cycle
  import numpy
  import matplotlib
  from .external import husl
  from .utils import desaturate, get_color_cycle
  from .colors import xkcd_rgb, crayons
  from ._compat import get_colormap
label_desc: Use image node_id 3 for calling the _ColorPalette obj's underlying member method code with example usage: obj.as_hex() and returns: _ColorPalette