Introduction
The most extensive collection of color palettes in R is the package paletteer by Emil Hvitfeldt@paletteer. Let’s load these palettes into .
Loading the paletteer palettes
The prepared system data can be loaded as follows:
paletteer = readRDS(gzcon(url("https://mtennekes.github.io/cols4all/paletteer.rds")))
# from paletteer version 1.6.0
c4a_sysdata_import(paletteer)
#> cols4all system data imported successfully
Note that this system data import will replace the default cols4all palettes. This is convenient because almost all cols4all palettes are also contained in paletteer. The only exceptions are the cols4all palette series "powerbi"
and "cols4all"
.
An overview of the number of available palettes:
(m <- c4a_overview(return.matrix = TRUE))
#> cat seq div cyc bivs bivc bivd bivg
#> awtools 4 2 0 0 0 0 0 0
#> basetheme 8 0 0 0 0 0 0 0
#> beyonce 100 21 9 0 0 0 0 0
#> ButterflyColors 30 0 0 0 0 0 0 0
#> calecopal 40 4 1 0 0 0 0 0
#> cartography 2 14 0 0 0 0 0 0
#> colorBlindness 3 2 14 0 0 0 0 0
#> colorblindr 2 0 0 0 0 0 0 0
#> colRoz 50 3 1 0 0 0 0 0
#> dichromat 2 2 13 0 0 0 0 0
#> DresdenColor 18 0 0 0 0 0 0 0
#> dutchmasters 6 0 0 0 0 0 0 0
#> feathers 11 0 0 0 0 0 0 0
#> fishualize 163 12 0 0 0 0 0 0
#> futurevisions 14 5 1 0 0 0 0 0
#> ggpomological 2 0 0 0 0 0 0 0
#> ggprism 61 4 0 0 0 0 0 0
#> ggsci 29 19 1 0 0 0 0 0
#> ggthemes 100 24 28 0 0 0 0 0
#> ggthemes_ptol 1 0 0 0 0 0 0 0
#> ggthemes_solarized 8 0 0 0 0 0 0 0
#> ggthemr 18 0 0 0 0 0 0 0
#> ghibli 27 0 0 0 0 0 0 0
#> grDevices 5 80 36 0 0 0 0 0
#> harrypotter 0 16 0 0 0 0 0 0
#> impressionist.colors 24 0 0 0 0 0 0 0
#> IslamicArt 16 0 0 0 0 0 0 0
#> jcolors 10 3 0 0 0 0 0 0
#> khroma 16 21 20 0 0 0 0 0
#> LaCroixColoR 13 0 8 0 0 0 0 0
#> lisa 121 4 3 0 0 0 0 0
#> ltc 24 0 0 0 0 0 0 0
#> Manu 21 0 0 0 0 0 0 0
#> MapPalettes 0 2 4 0 0 0 0 0
#> MetBrewer 56 0 0 0 0 0 0 0
#> MexBrewer 4 7 7 0 0 0 0 0
#> miscpalettes 16 1 0 0 0 0 0 0
#> MoMAColors 25 6 4 0 0 0 0 0
#> musculusColors 7 0 0 0 0 0 0 0
#> nationalparkcolors 25 0 0 0 0 0 0 0
#> NatParksPalettes 30 0 0 0 0 0 0 0
#> nbapalettes 128 1 0 0 0 0 0 0
#> NineteenEightyR 7 3 2 0 0 0 0 0
#> nord 11 3 2 0 0 0 0 0
#> ochRe 15 0 1 0 0 0 0 0
#> oompaBase 0 5 3 0 0 0 0 0
#> palettesForR 42 4 2 0 0 0 0 0
#> palettetown 389 0 0 0 0 0 0 0
#> palr 0 4 0 0 0 0 0 0
#> pals 8 59 18 0 0 0 0 0
#> peRReo 21 0 0 0 0 0 0 0
#> PNWColors 4 7 3 0 0 0 0 0
#> Polychrome 8 0 0 0 0 0 0 0
#> PrettyCols 16 8 8 0 0 0 0 0
#> rcartocolor 6 21 7 0 0 0 0 0
#> RColorBrewer 8 19 8 0 0 0 0 0
#> Redmonder 24 10 7 0 0 0 0 0
#> rockthemes 21 0 0 0 0 0 0 0
#> RSkittleBrewer 5 0 0 0 0 0 0 0
#> rtist 15 0 0 0 0 0 0 0
#> scico 0 21 14 0 0 0 0 0
#> severance 7 0 0 0 0 0 0 0
#> soilpalettes 7 7 0 0 0 0 0 0
#> suffrager 6 0 0 0 0 0 0 0
#> tayloRswift 14 1 0 0 0 0 0 0
#> tidyquant 3 0 0 0 0 0 0 0
#> trekcolors 23 8 4 0 0 0 0 0
#> tvthemes 58 0 0 0 0 0 0 0
#> unikn 5 8 3 0 0 0 0 0
#> vangogh 15 0 0 0 0 0 0 0
#> vapeplot 8 0 0 0 0 0 0 0
#> vapoRwave 11 2 1 0 0 0 0 0
#> viridis 0 8 0 0 0 0 0 0
#> waRhol 15 0 0 0 0 0 0 0
#> werpals 17 1 0 0 0 0 0 0
#> wesanderson 24 0 0 0 0 0 0 0
#> yarrr 21 0 0 0 0 0 0 0
There are in total 2759 palettes, and by palette type:
colSums(m)
#> cat seq div cyc bivs bivc bivd bivg
#> 2074 452 233 0 0 0 0 0
Exploring the palettes
Now we can start the interactive tool:
c4a_gui()
First we will see all categorical palettes of length 7, sorted by name. When we filter on color blind friendliness and sort by fairness we get this table:
As you can see, the top three palettes are identical, namely the palette by Okabe and Ito@okabe, but from difference R package sources and variations regarding the the eighth color (black or gray).
The other way round, when we filter on fair and sort by colorblind-friendliness we get this table:
Observe that there are no color palettes of length 7 that are both color-blind friendly and fair. The good news is that cols4all contains a few new preliminary palettes that meet both criteria. See strategies for palette design.