jmaasch
sanzo
HTML

R Color Palettes Based on the Works of Sanzo Wada – A CRAN Package

Last updated May 12, 2026
40
Stars
2
Forks
0
Issues
0
Stars/day
Attention Score
14
Language breakdown
HTML 99.3%
R 0.7%
Files click to expand
README

Color Palettes Based on the Works of Sanzo Wada

An R package by JRMA Maasch (2019). View on CRAN.

Table of contents

About

Inspired by the art and color research of Sanzo Wada, his Dictionary Of Color Combinations, and the incredible interactive site by Dain M. Blodorn Kim, this package brings Wada's color combinations to R for easy use in data visualizations. This package honors 60 of Wada's color combinations: 20 duos, 20 trios, and 20 quads.

Sanzo Wada (1883-1967) was an artist, teacher, costume and kimono designer during a turbulent time in avant-garde Japanese art and cinema. Wada was ahead of his time in developing traditional and Western influenced color combinations, helping to lay the foundations for contemporary color research. Based on his original 6-volume work from the 1930s, this book offers 348 color combinations with CMYK and Pantone numbers, as attractive and sensuous as the book’s own design. – A Dictionary Of Color Combinations

This package is licensed under the GNU General Public License v3.0 (GPL-3).

return to top

Usage

Installation.

# Install from CRAN (recommended).
install.packages("sanzo")

Alternatively, install development version.

Note: the package devtools must be installed but need not be loaded.

devtools::install_github("jmaasch/sanzo")

Load package.

library(sanzo)

View documentation.

View this vignette for additional package documentation, or precede any function by a question mark to access description, arguments, return value, and usage suggestions.

# Access function documentation.
?sanzo.info2()
?sanzo.trio()

View palette demos using
.demo*
functions.

Each color combination can be demo'd via base R scatter and bar plots. To view the output of these functions, see Full suite: Duo palettes. | Trio palettes. | Quad palettes.

# Print demo plots for duos.
sanzo.demo2()

Print demo plots for trios.

sanzo.demo3()

Print demo plots for quads.

sanzo.demo4()

Print demo plots for all palettes.

sanzo.demo.all()

Optional: for easier viewing, try gridding up prior to running

.demo*
functions. NOTE: This will alter
settings.

# Set up gridded layout, if desired:
graphics::layout(matrix(1:4, nrow = 2))
graphics::par(mar = c(2, 2, 2, 2))

Use with base R.

All examples use data from the

package and should be replicable.

# Assign palette to a name if desired.
my_duo <- sanzo.duo("c229")
my_trio <- sanzo.trio("c223")
my_quad <- sanzo.quad("c252")

Use palette that has been assigned to a name.

plot(iris$Sepal.Length, iris$Sepal.Width, col = my_quad)

Use directly.

plot(iris$Sepal.Length, iris$Sepal.Width, col = sanzo.duo("c085"))

Use with
.

Use with

or
. All examples use data from the
package and should be replicable.

ggplot(iris, aes(fill = Species, y = Sepal.Width, x = Sepal.Length)) + 
  geom_bar(stat = "identity") +
  scalefillmanual(values = sanzo.trio("c223"))

Use as a continuous color palette.

By default,

palettes are discrete. There are multiple ways to achieve a gradient. For example, using
or
in
allows you to use any
palette as a continuous gradient. See example visualizations here.

ggplot(faithfuld, aes(waiting, eruptions)) +
   geom_raster(aes(fill = density), interpolate = TRUE) +
   scalefillgradientn(colors = sanzo.duo("c102"))

Access palette metadata with
.info*
functions.

These functions return a data frame containing long-form names, short-form IDs, hexadecimal values, and links to Dain M. Blodorn Kim's https://sanzo-wada.dmbk.io for further information.

duoinfodf <- sanzo.info2()

trioinfodf <- sanzo.info3()

quadinfodf <- sanzo.info4()

info_df <- sanzo.info.all()

Two ways to print a data frame.

print(sanzo.info2()) knitr::kable(sanzo.info2())

Duo, trio, and quad data are stored in exported lists. To quickly access palette names or hexadecimals only:

# Access palette names.
names(duos)
names(trios)
names(quads)

Print hex values for a given palette to the console.

Example output = [1] "#ff616b" "#000831"

sanzo.duo("c006")

Customize.

Concatenate multiple palettes to make a custom palette or cherry-pick individual colors. All hexadecimals are provided by the

.demo
functions and
.info
functions.

c033 <- sanzo.duo("c033")
c095 <- sanzo.duo("c095")
custom_quad <- c(c033, c095)

For a more muted color palette, select an alpha less than 1. In the plot at right,

= 5/6
.

return to top

gallery

Many of the plots in this gallery additionally use the

and
packages.

Scatter plots.

| | | |:-------------------------:|:-------------------------:| |Combination 205,

= 3/4.
|Combination 194,
= 3/4.
| |scatter1|scatter2| |Combination 121,
= 3/4.
|Combination 172,
= 3/4.
| |scatter3|scatter4|

Violin plots.

Bar plots.

| | | |:-------------------------:|:-------------------------:| |bar1|bar2|

2D Density plots.

See how to use

color combinations as continuous palettes here.

return to top

View full suite

Duo palettes.

| | | |:-------------------------:|:-------------------------:| |demo1|demo2| |demo3|demo4| |demo5|demo6| |demo7|demo8| |demo9|demo10|

return to top

Trio palettes.

| | | |:-------------------------:|:-------------------------:| |demo1|demo2| |demo3|demo4| |demo5|demo6| |demo7|demo8| |demo9|demo10|

return to top

Quad palettes.

| | | |:-------------------------:|:-------------------------:| |demo1|demo2| |demo3|demo4| |demo5|demo6| |demo7|demo8| |demo9|demo10|

return to top

🔗 More in this category

© 2026 GitRepoTrend · jmaasch/sanzo · Updated daily from GitHub