library(pals) # for palettes with large n #kelly()22, #polychrome()#36, cols
I will create a very big palette merging different colour palettes from pals.
pal.bands(kelly())
From this palette I will remove black and white, as well as the light blue, similar to the cols25 one.
# remove the black and white from the pallete, and the light blue similars to cols25
# assessed with pal.bands and pal.cube
kelly_col <- unname(kelly()[-c(1,2,6)])
pal.bands(kelly_col)
#pal.cube(kelly_col)
pal.safe(kelly_col)
pal.bands(cols25())
I remove the orange colour that is similar to the kelly, and sort with
prettiest colours first and ugliest or still similar to kelly last. The
similarity has been assessed with pal.cube(), interactive plot to see
how similar colours are.See here
cols24 <- unname(cols25()[c(19,22:24,8:14, 1:4, 15:17,6,7,25,18,20,21)])
pal.bands(cols24)
I merge these two palettes, where the first 22 are really nice (kelly palette), the next 24 are ok, and I tried to keep the most distinct colours first, and finally 36 extra colours are added at the end to be sure I always have enough colours (these are not checked in comparison with the others, I simply used the biggest palette from pals() package)
# merge all pallettes for long list colours,
# my favourite are the first 22 (kelly), cols24 is not bad and I tried to keep it distinct
# and polychrome is just added at the end in case we are missing levels (no checked it is safe with the other 42)
cols <- c(kelly_col, cols24, unname(polychrome()))
pal.bands(cols)
#pal.cube(kelly_col)
pal.safe(cols)