How to generate a number of most distinctive colors in R?

I joined all qualitative palettes from RColorBrewer package. Qualitative palettes are supposed to provide X most distinctive colours each. Of course, mixing them joins into one palette also similar colours, but that’s the best I can get (74 colors). library(RColorBrewer) n <- 60 qual_col_pals = brewer.pal.info[brewer.pal.info$category == ‘qual’,] col_vector = unlist(mapply(brewer.pal, qual_col_pals$maxcolors, rownames(qual_col_pals))) pie(rep(1,n), col=sample(col_vector, … Read more