https://cran.stat.auckland.ac.nz/web/packages/colorrepel/index.html
CRAN: Package colorrepel
Iterate and repel visually similar colors away in various 'ggplot2' plots. When many groups are plotted at the same time on multiple axes, for instance stacked...
cranpackage