class_docstr: Set the color palette in a with statement, otherwise be a list.
docstr: Rich display of the color palette in an HTML frontend.
docstr_tok: ["Rich","display","of","the","color","palette","in","an","HTML","frontend","."]
code: def _repr_html_(self):
      """Rich display of the color palette in an HTML frontend."""
      s = 55
      n = len(self)
      html = f'<svg  width="{n * s}" height="{s}">'
      for i, c in enumerate(self.as_hex()):
          html += (
              f'<rect x="{i * s}" y="0" width="{s}" height="{s}" style="fill:{c};'
              'stroke-width:2;stroke:rgb(255,255,255)"/>'
          )
      html += "</svg>"
      return html
  
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 4 for calling the _ColorPalette obj's underlying member method code with example usage: obj._repr_html_() and returns: html