code: def parse_colors(s, length=1):
      '''helper for parsing a string that can be either a matplotlib
         color or be a tuple of colors. Returns a tuple of them either
         way.
      '''
      if length and length > 1:
          return parse_ctuple(s,length=length);
      if re.match('^ *{} *$'.format(isrx_s), s):
          #it's just a string.
          return [s];
      elif re.match('^ *{} *$'.format(rgbrx_s), s):
          return [eval(s)];
      else:
          return parse_ctuple(s,length=length)f parse_colors(s, length=1):
      '''helper for parsing a string that can be either a matplotlib
         color or be a tuple of colors. Returns a tuple of them either
         way.
      '''
      if length and length > 1:
          return parse_ctuple(s,length=length);
      if re.match('^ *{} *$'.format(isrx_s), s):
          #it's just a string.
          return [s];
      elif re.match('^ *{} *$'.format(rgbrx_s), s):
          return [eval(s)];
      else:
          return parse_ctuple(s,length=length);
docs: helper for parsing a string that can be either a matplotlib
         color or be a tuple of colors. Returns a tuple of them either
         way.