Search notes:

R package: RColorBrewer

RColorBrewer can be used to create colorful graphs with pre-made palettes that consist of 8 to 12 colors. In order to create more colors in a palette, colorRampPalette can be used.
There are three types of palettes:

Show all palettes

library(RColorBrewer)
display.brewer.all()
Github repository about-r, path: /packages/RColorBrewer/display.brewer.all.R

RdYlBu

A particular beautiful palette seems to be RdYlBu:
library(RColorBrewer)
library(raster)

palette = brewer.pal(11,'RdYlBu');

grid <- raster(ncols=11, nrows = 1, xmn=1, xmx=11, ymn=1,ymx=2);

values(grid) <- 1:11

par(mar=rep(0.5, 4))
plot(grid, col=palette, legend=FALSE, axes = 0, box=FALSE)
Github repository about-r, path: /packages/RColorBrewer/RdYlBu.R

See also

R functions for colors, colorRampPalette
The function palette_explorer in the package tmaptools is an interactive application (package shiny) that allows to explore Color Brewer and viridis palettes.
R packages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1738262826, '3.142.164.254', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/packages/RColorBrewer/index(82): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78