palette_plot: Visualize a color palette as swatches of colors, possibly...

View source: R/gg_color_swatches.R

palette_plotR Documentation

Visualize a color palette as swatches of colors, possibly with labels printed on top

Description

Visualize a color palette as swatches of colors, possibly with labels printed on top

Usage

palette_plot(colors, label_size = 6, label_family = "",
  color_labels = TRUE, ...)

Arguments

colors

Vector of color names or hex codes.

label_size

Size of the color labels to be printed.

label_family

Font family of the labels

color_labels

Individual bool or vector of bools indicating for which colors the color names should be printed on top of the color swatch.

...

Other parameters to be handed off to gg_color_swatches.

Examples

palette_plot(palette_OkabeIto)
palette_plot(c("red", "green", "yellow", "magenta"), color_labels = FALSE)

clauswilke/colorblindr documentation built on July 29, 2023, 2:17 p.m.