class_docstr: Base class for color palettes.
code: def _set_palette_colors(self, palette):
      try:
          # Palette is a string.
          # Retreive the appropriate ColorPalette object.
          if palette.lower():
              palette = colors.color_palettes[palette]
      except AttributeError:
          pass
  
      palette_colors = getattr(palette, "colors", None)
      if palette_colors is not None:
          # Palette is a ColorPalette object
          self._colors = [color.get_hex_l() for color in palette_colors]
      else:
          # Palette is a list of color strings
          self._colors = [
              colors.Color(color).get_hex_l() for color in palette
          ]
  
imports: from itertools import cycle
  import yaml
  import bokeh
  from bokeh.core.properties import value
  from chartify._core import colors
  from chartify._core.options import options
  from packaging import version
label_desc: Use image node_id 2 for calling the BasePalette obj's underlying member method code with example usage: obj._set_palette_colors(palette) without return types