Package 'sanzo'

Title: Color Palettes Based on the Works of Sanzo Wada
Description: Inspired by the art and color research of Sanzo Wada (1883-1967), his "Dictionary Of Color Combinations" (2011, ISBN:978-4861522475), and the interactive site by Dain M. Blodorn Kim <https://github.com/dblodorn/sanzo-wada>, 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.
Authors: Jacqueline Maasch [aut, cre]
Maintainer: Jacqueline Maasch <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2025-02-15 03:08:58 UTC
Source: https://github.com/jmaasch/sanzo

Help Index


List of duos

Description

List containing all 20 duo palettes, defined by hexadecimal values.

Usage

duos

Format

An object of class list of length 20.


List of quads

Description

List containing all 20 quad palettes, defined by hexadecimal values.

Usage

quads

Format

An object of class list of length 20.


Print demo plots for all palettes

Description

Print demo base R plots for all 60 sanzo palettes to illustrate their use and display hexadecimal values.

Usage

sanzo.demo.all()

Examples

sanzo.demo.all()

Print demo plots for all duo palettes

Description

Print demo base R plots for all 20 duo palettes to illustrate their use and display hexadecimal values.

Usage

sanzo.demo2()

Examples

sanzo.demo2()

Print demo plots for all trio palettes

Description

Print demo base R plots for all 20 trio palettes to illustrate their use and display hexadecimal values.

Usage

sanzo.demo3()

Examples

sanzo.demo3()

Print demo plots for all quad palettes

Description

Print demo base R plots for all 20 quad palettes to illustrate their use and display hexadecimal values.

Usage

sanzo.demo4()

Examples

sanzo.demo4()

Generate two-colored palettes

Description

Generate two-colored palettes.

Usage

sanzo.duo(palette_name)

Arguments

palette_name

The short ID for the palette, e.g. "c006". For full list of duo IDs, use sanzo.info2().

Value

A vector of hexademicals of length 2.

Examples

# Assign palette to a name.
my_palette <- sanzo.duo("c229")

# Concatenate two duos for a custom quad.
c033 <- sanzo.duo("c033")
c095 <- sanzo.duo("c095")
custom_quad <- c(c033, c095)

# Use with base R.
plot(iris$Sepal.Width,
     iris$Sepal.Length,
     col = sanzo.duo("c085"))

# For examples of use with ggplot2, see https://github.com/jmaasch/sanzo.

# For examples of use as a gradient, see https://github.com/jmaasch/sanzo.

See metadata for all palettes

Description

Create 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 all sanzo palettes.

Usage

sanzo.info.all()

Value

Return data frame containing long-form names, short-form IDs, hex values, and URLs for all sanzo palettes.

Examples

info_df <- sanzo.info.all()
print(sanzo.info.all())

See metadata for all duo palettes

Description

Create 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 all duo palettes.

Usage

sanzo.info2()

Value

Return data frame containing long-form names, short-form IDs, hex values, and URLs for all duos.

Examples

duo_info_df <- sanzo.info2()
print(sanzo.info2())

See metadata for all trio palettes

Description

Create 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 all trio palettes.

Usage

sanzo.info3()

Value

Return data frame containing long-form names, short-form IDs, hex values, and URLs for all trios.

Examples

trio_info_df <- sanzo.info3()
print(sanzo.info3())

See metadata for all quad palettes

Description

Create 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 all quad palettes.

Usage

sanzo.info4()

Value

Return data frame containing long-form names, short-form IDs, hex values, and URLs for all quads

Examples

quad_info_df <- sanzo.info4()
print(sanzo.info4())

Generate four-colored palettes

Description

Generate four-colored palettes.

Usage

sanzo.quad(palette_name)

Arguments

palette_name

The short ID for the palette, e.g. "c263". For full list of quad IDs, use sanzo.info4().

Value

A vector of hexademicals of length 3.

Examples

# Assign palette to a name.
my_palette <- sanzo.quad("c252")

# Concatenate two quads for a custom eight-colored palette.
c348 <- sanzo.quad("c348")
c341 <- sanzo.quad("c341")
custom_eight <- c(c348, c341)

# Use with base R.
plot(iris$Sepal.Width,
     iris$Sepal.Length,
     col = sanzo.quad("c341"))

# For examples of use with ggplot2, see https://github.com/jmaasch/sanzo.

# For examples of use as a gradient, see https://github.com/jmaasch/sanzo.

Generate three-colored palettes

Description

Generate three-colored palettes.

Usage

sanzo.trio(palette_name)

Arguments

palette_name

The short ID for the palette, e.g. "c121". For full list of trio IDs, use sanzo.info3().

Value

A vector of hexademicals of length 3.

Examples

# Assign palette to a name.
my_palette <- sanzo.trio("c223")

# Concatenate two trios for a custom six-colored palette.
c207 <- sanzo.trio("c207")
c226 <- sanzo.trio("c226")
custom_six <- c(c207, c226)

# Use with base R.
plot(iris$Sepal.Width,
     iris$Sepal.Length,
     col = sanzo.trio("c343"))

# For examples of use with ggplot2, see https://github.com/jmaasch/sanzo.

# For examples of use as a gradient, see https://github.com/jmaasch/sanzo.

List of trios

Description

List containing all 20 trio palettes, defined by hexadecimal values.

Usage

trios

Format

An object of class list of length 20.