This produces much more visually pleasing palettes compared to the crude algorithm which was previously used.