code: def isconst(cls, val):
          ''' Whether the value is a string color literal.
  
          Checks for a well-formed hexadecimal color value or a named color.
  
          Args:
              val (str) : the value to check
  
          Returns:
              True, if the value is a string color literal
  
          '''
          return isinstance(val, string_types) and \
                 ((len(val) == 7 and val[0] == "#") or val in enums.NamedColorf isconst(cls, val):
          ''' Whether the value is a string color literal.
  
          Checks for a well-formed hexadecimal color value or a named color.
  
          Args:
              val (str) : the value to check
  
          Returns:
              True, if the value is a string color literal
  
          '''
          return isinstance(val, string_types) and \
                 ((len(val) == 7 and val[0] == "#") or val in enums.NamedColor)
docs: Whether the value is a string color literal.
  
          Checks for a well-formed hexadecimal color value or a named color.
  
          Args:
              val (str) : the value to check
  
          Returns:
              True, if the value is a string color literal