match_colors function

Reorder a color palette to best match a reference palette