def get(img, light=False, backend="<STR_LIT>", cache_dir=CACHE_DIR, sat="<STR_LIT>"):
<EOL>cache_name = cache_fname(img, backend, light, cache_dir, sat)<EOL>cache_file = os.path.join(*cache_name)<EOL>if os.path.isfile(cache_file):<EOL><INDENT>colors = theme.file(cache_file)<EOL>colors["<STR_LIT>"] = util.Color.alpha_num<EOL>logging.info("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>logging.info("<STR_LIT>")<EOL>backend = get_backend(backend)<EOL>try:<EOL><INDENT>__import__("<STR_LIT>" % backend)<EOL><DEDENT>except ImportError:<EOL><INDENT>__import__("<STR_LIT>")<EOL>backend = "<STR_LIT>"<EOL><DEDENT>logging.info("<STR_LIT>", backend)<EOL>backend = sys.modules["<STR_LIT>" % backend]<EOL>colors = getattr(backend, "<STR_LIT>")(img, light)<EOL>colors = colors_to_dict(saturate_colors(colors, sat), img)<EOL>util.save_file_json(colors, cache_file)<EOL>logging.info("<STR_LIT>")<EOL><DEDENT>return colors<EOL>
Generate a palette.