def color(colors, export_type, output_file=None):
all_colors = flatten_colors(colors)<EOL>template_name = get_export_type(export_type)<EOL>template_file = os.path.join(MODULE_DIR, "<STR_LIT>", template_name)<EOL>output_file = output_file or os.path.join(CACHE_DIR, template_name)<EOL>if os.path.isfile(template_file):<EOL><INDENT>template(all_colors, template_file, output_file)<EOL>logging.info("<STR_LIT>", export_type)<EOL><DEDENT>else:<EOL><INDENT>logging.warning("<STR_LIT>", export_type)<EOL><DEDENT>
Export a single template file.