code: def is_color(color):
      
      if not isinstance(color, basestring):
          return False
      elif RGB_HEX_REGEX.match(color):
          return True
      elif color in COLOR_ALIASES:
          return True
      elif color in cnames:
          return True
      return False
docs: Checks if supplied object is a valid color spec.