Edit

I just read your question properly - I do not believe there is a way to use a non-RColorBrewer palette with the process_map() function. A potential workaround is to find the source code and create your own function based on the bupaR function to accept other palettes, but as far as I can tell it will only accept RColorBrewer or Viridis palettes at present.

--

Depending on your use case you could use colorRampPalette() to build your palette from white to #004b88, e.g.

To see "Purples":

library(RColorBrewer)
scales::show_col(brewer.pal(6, name = "Purples"))

To create and see a new palette:

palette_blues <- colorRampPalette(colors = c("white", "#004b88"))(6)
scales::show_col(palette_blues)

And if you want more than 6 colours or you don't want to start with white you can change the number and 'drop' some from the end, e.g.

palette_blues <- colorRampPalette(colors = c("white", "#004b88"))(12)
scales::show_col(palette_blues[4:12])

Answer from jared_mamrot on Stack Overflow
🌐
R Graph Gallery
r-graph-gallery.com › 38-rcolorbrewers-palettes.html
R Color Brewer’s palettes
Qualitative palettes do not imply magnitude differences between legend classes, and hues are used to create the primary visual differences between classes. Qualitative schemes are best suited to representing nominal or categorical data. library(RColorBrewer) par(mar=c(3,4,2,2)) display.brewer.all()
People also ask

What is the best color palette to use in R?
For almost any chart, reach for viridis — it is perceptually uniform, colorblind-safe, and still readable in greyscale, so you rarely go wrong with it. When you need curated sequential, diverging, or qualitative sets (thematic maps, grouped bars), use RColorBrewer. Go beyond those two only for a specific look — scientific-journal (ggsci), Wes Anderson, or the base-R classics. Avoid plain rainbow() for data: it is not perceptually uniform and breaks under colorblindness.
🌐
datanovia.com
datanovia.com › blog › r color palettes: the complete reference
R Color Palettes: The Complete Reference – Datanovia
Which R color palettes are colorblind-safe?
viridis and its variants (magma, plasma, inferno, cividis) are colorblind-safe by design. In RColorBrewer, restrict yourself to the palettes flagged safe by display.brewer.all(colorblindFriendly = TRUE). Whatever you pick, sanity-check it the way the colorblind-safe section shows — simulate deuteranopia and view the plot in greyscale — and never rely on color as the only signal.
🌐
datanovia.com
datanovia.com › blog › r color palettes: the complete reference
R Color Palettes: The Complete Reference – Datanovia
How do I get more colors than a palette provides?
Built-in palettes have a fixed number of colors (RColorBrewer sets top out at 8–12). To stretch any palette to as many colors as you need, interpolate with colorRampPalette(): colorRampPalette(brewer.pal(9, "Blues"))(50) returns 50 shades. The expand-a-palette section walks through it — the right tool when a discrete scale runs out of colors for your groups.
🌐
datanovia.com
datanovia.com › blog › r color palettes: the complete reference
R Color Palettes: The Complete Reference – Datanovia
🌐
R Graph Gallery
r-graph-gallery.com › package › rColorBrewer.html
Access mutliple color palettes with RColorBrewer
The display.brewer.pal() function allows you to visualize a palette. ... Since RColorBrewer is an extension of ggplot2, you can use it to customize the color of your plots.
🌐
Rdrr.io
rdrr.io › cran › RColorBrewer › man › ColorBrewer.html
ColorBrewer: ColorBrewer palettes in RColorBrewer: ColorBrewer Palettes
April 4, 2022 - There are 3 types of palettes, sequential, diverging, and qualitative. 1. Sequential palettes are suited to ordered data that progress from low to high. Lightness steps dominate the look of these schemes, with light colors for low data values to dark colors for high data values.
🌐
Datanovia
rpkgs.datanovia.com › ggpubr › reference › get_palette.html
Generate Color Palettes — get_palette • ggpubr
RColorBrewer palettes, see brewer.pal and details section. Examples of palette names include: "RdBu", "Blues", "Dark2", "Set2", ...; Custom color palettes.
🌐
Datanovia
datanovia.com › blog › r color palettes: the complete reference
R Color Palettes: The Complete Reference – Datanovia
July 12, 2026 - The complete reference to R color palettes: viridis, RColorBrewer, grey, scientific-journal (ggsci) and Wes Anderson palettes, the 657 built-in color names, hex codes, how to expand a palette with colorRampPalette(), and colorblind-safe choices — every swatch rendered from real R.
🌐
Emilhvitfeldt
emilhvitfeldt.github.io › r-color-palettes › discrete › RColorBrewer › Set1 › index.html
RColorBrewer - Set1
RColorBrewer · Use with paletteer package: library(paletteer) paletteer_d("RColorBrewer::Set1") Use raw: c("#E41A1CFF", "#377EB8FF", "#4DAF4AFF", "#984EA3FF", "#FF7F00FF", "#FFFF33FF", "#A65628FF", "#F781BFFF", "#999999FF")
Find elsewhere
🌐
UVA Library
library.virginia.edu › data › articles › setting-up-color-palettes-in-r
Setting up Color Palettes in R | UVA Library
June 10, 2016 - Trying to choose good colors out of 657 choices can be overwhelming and lead to a lot of trial and error. Fortunately, a great deal of research has been done on plotting and color combinations, and there are several tried-and-tested color palettes to choose from. One R package that provides some of these palettes is RColorBrewer.
🌐
R-bloggers
r-bloggers.com › r bloggers › creating color palettes in r
Creating color palettes in R | R-bloggers
July 10, 2016 - library(RColorBrewer) # To see all palettes available in this package par(mfrow=c(1, 1)) display.brewer.all() # To create pie charts from a sequential, divergent and qualitative RColorBrewer palette par(mfrow=c(1, 4)) pie3D(sliceValues,explode=0, theta=1.2, col=brewer.pal(7, "RdPu"), main="Sequential RdPu") pie3D(sliceValues,explode=0, theta=1.2, col=brewer.pal(7, "RdGy"), main="Divergent RdGy") pie3D(sliceValues,explode=0, theta=1.2, col=brewer.pal(7, "Set1"), main="Qualitative Set1") # And add pie chart with a wes_anderson palette # we will only use 5 slices in the example since the Darjeeling palette only has 5 colors library(wesanderson) pie3D(sliceValues[1:5],explode=0, theta=1.2, col=wes_palette("Darjeeling2"), main="Darjeeling2")
🌐
GitHub
github.com › bupaverse › processmapR › issues › 36
How to create custom RColorBrewer palette? · Issue #36 · bupaverse/processmapR
March 18, 2021 - I want to change the color scale based on a hex code color I provide. For example below the color_scale argument takes a value based on available color palette from RColorBrewer library library(bupaR) patients %>% process_map(type = freq...
Author: bupaverse
🌐
GeeksforGeeks
geeksforgeeks.org › introduction-to-color-palettes-in-r-with-rcolorbrewer
Introduction to Color Palettes in R with RColorBrewer - GeeksforGeeks
October 17, 2021 - To install the RColorBrewer package in R Language we can use a cran mirror using: ... After running this, select the desired cran mirror from the list of available mirrors and the package will be installed. ... The Sequential color palettes have colors ordered in intensity and saturation.
🌐
R Graph Gallery
r-graph-gallery.com › 40-rcolorbrewer-get-a-longer-palette.html
Get a long color palette with RColorBrewer – the R Graph Gallery
Note: visit this post for a complete list of the available palettes. # No margin par(mar=c(0,0,1,0)) # Load RColorBrewer library(RColorBrewer) # Classic palette BuPu, with 4 colors coul <- brewer.pal(4, "PuOr") # Add more colors to this palette : coul <- colorRampPalette(coul)(25) # Plot it pie(rep(1, length(coul)), col = coul , main="")
🌐
Emilhvitfeldt
emilhvitfeldt.github.io › r-color-palettes › discrete › RColorBrewer › Set2
RColorBrewer - Set2
RColorBrewer · Use with paletteer package: library(paletteer) paletteer_d("RColorBrewer::Set2") Use raw: c("#66C2A5FF", "#FC8D62FF", "#8DA0CBFF", "#E78AC3FF", "#A6D854FF", "#FFD92FFF", "#E5C494FF", "#B3B3B3FF")
🌐
Robwschlegel
robwschlegel.github.io › Intro_R_Workshop › brewing.html
Intro R Workshop: Data Manipulation, Analysis, and Visualisation
For this reason there are many built in functions that we may use in order to have precise control over the colours we use, as well as additional packages that extend our options even further. The RColorBrewer package should have been installed on your computer and activated automatically when we installed and activated the tidyverse. We will use this package for its lovely colour palettes.
🌐
R-bloggers
r-bloggers.com › r bloggers › how to expand color palette with ggplot and rcolorbrewer
How to expand color palette with ggplot and RColorBrewer | R-bloggers
September 13, 2013 - The difference: fill parameter was moved outside of histogram aes function – this effectively removed fill information from aesthetics data set for ggplot. Hence, there is nothing to apply legend to. To fix it place fill back into aes and use scale_fill_manual to define custom palette:
🌐
R Graph Gallery
r-graph-gallery.com › 39-pie-plot-with-rcolorbrewer-palette.html
Using RColorBrewer from base R. – the R Graph Gallery
Note: visit this post for a complete list of the available palettes. # No margin par(mar=c(0,0,1,0)) # Load RColorBrewer library(RColorBrewer) # Build a color palette, 5 colors coming from the BuPu color palette" coul <- brewer.pal(5, "BuPu") # Build a pie chart with it pie(rep(1, length(coul)), col = coul , main="")
🌐
CRAN
cran.r-project.org › web › packages › RColorBrewer › RColorBrewer.pdf pdf
RColorBrewer package - CRAN - R Project
All the sequential palettes are available in variations from 3 different values up to 9 different values.
🌐
R-lib
scales.r-lib.org › reference › pal_brewer.html
Colour Brewer palette (discrete) — pal_brewer • scales
If a string, will use that named palette. If a number, will index into the list of palettes of appropriate type ... Sets the order of colours in the scale. If 1, the default, colours are as output by RColorBrewer::brewer.pal().