class_docstr: A helper for mapping categorical values to colors on demand.
docstr: Converts color strings into a color listing.
docstr_tok: ["Converts","color","strings","into","a","color","listing","."]
code: def colors(self, value):
      """
      Converts color strings into a color listing.
      """
      if isinstance(value, str):
          # Must import here to avoid recursive import
          from .palettes import PALETTES
  
          if value not in PALETTES:
              raise YellowbrickValueError(
                  "'{}' is not a registered color palette".format(value)
              )
          self._colors = copy(PALETTES[value])
      elif isinstance(value, list):
          self._colors = value
      else:
          self._colors = list(value)
  
file_path: yellowbrick/yellowbrick/style/colors.py
imports: import random
  import warnings
  import numpy
  import matplotlib
  import matplotlib.cm
  from copy import copy
  from yellowbrick.exceptions import YellowbrickValueError
  from distutils.version import LooseVersion
label_desc: Use image node_id 3 for calling the ColorMap obj's underlying member method code with example usage: obj.colors(value) without return types