build_palette: Generate a palette of related colors around a central color

View source: R/palettes.R

build_paletteR Documentation

Generate a palette of related colors around a central color

Description

Generate a palette of related colors around a central color

Usage

build_palette(
  central_color,
  n_colors = 10,
  hue_range = 0.1,
  sat_range = 0.4,
  val_range = 0.45
)

Arguments

central_color

a single color value around which to build the palette

n_colors

the number of colors to return in the primary palette (max = 100, default = 10)

hue_range

how much variation in hue is allowed in the palette (range = 0 to 1, default = 0.1)

val_range

how much variation in value is allowed in the palette (range = 0 to 1, default = 0.45)

Value

a list of palette results, containing:

  • palette: a character vector with a 10-color palette realted to the central_color.

  • palette_plot: a ggplot2 object showing the 10 colors in palette.

  • colorset: A character vector with the full set of 100 colors from which the palette was selected.

  • colorset_plot: A ggplot2 object displaying all 100 colors in the colorset.

  • weave: a ggplot2 object generated with weave_plot() showing the intersection of all of the collors in the palette.


hypercompetent/colorway documentation built on April 2, 2024, 1:44 a.m.