def guess_name(clr):
clr = Color(clr)<EOL>if clr.is_transparent: return "<STR_LIT>"<EOL>if clr.is_black: return "<STR_LIT>"<EOL>if clr.is_white: return "<STR_LIT>"<EOL>if clr.is_black: return "<STR_LIT>"<EOL>for name in named_colors:<EOL><INDENT>try:<EOL><INDENT>r, g, b = named_colors[name]<EOL><DEDENT>except:<EOL><INDENT>continue<EOL><DEDENT>if r == clr.r and g == clr.g and b == clr.b:<EOL><INDENT>return name<EOL><DEDENT><DEDENT>for shade in shades:<EOL><INDENT>if clr in shade:<EOL><INDENT>return shade.name + "<STR_LIT:U+0020>" + clr.nearest_hue()<EOL>break<EOL><DEDENT><DEDENT>return clr.nearest_hue()<EOL>
Guesses the shade and hue name of a color.

If the given color is named in the named_colors list, return that name.
Otherwise guess its nearest hue and shade range.