for index, color in col_list:
    main_colors.add(tuple(component >> 6 for component in color))
return [tuple(component << 6 for component in color) for color in main_colors]
Automatically recognize patterns in images