def parse_colors(path):
if path.endswith("<STR_LIT>"):<EOL><INDENT>return parse_rgb_txt_file(path)<EOL><DEDENT>elif path.endswith("<STR_LIT>"):<EOL><INDENT>return parse_json_color_file(path)<EOL><DEDENT>raise TypeError("<STR_LIT>")<EOL>
Parse the given color files.

    Supported are:
        * .txt for X11 colors
        * .json for colornames