def toggle(s):
is_numeric = '<STR_LIT:U+002C>' in s or s.startswith('<STR_LIT>') or s.startswith('<STR_LIT:#>')<EOL>c = name_to_color(s)<EOL>return color_to_name(c) if is_numeric else str(c)<EOL>
Toggle back and forth between a name and a tuple representation.

:param str s: a string which is either a text name, or a tuple-string:
              a string with three numbers separated by commas

:returns: if the string was a text name, return a tuple.  If it's a
          tuple-string and it corresponds to a text name, return the text
          name, else return the original tuple-string.