def parse_color_string(css_string):
 tokens = list(tokenize_grouped(css_string.strip()))
 if (len(tokens) == 1):
  return parse_color(tokens[0])

def parse_color_string ( css_string ) : tokens = list ( tokenize_grouped ( css_string . strip ( ) ) ) if ( len ( tokens ) == 1 ) : return parse_color ( tokens [ 0 ] )
parse a css string as a color value .