vis_palette: Visualize Color Palettes

View source: R/palettes.R

vis_paletteR Documentation

Visualize Color Palettes

Description

This function takes a list of color palettes and visualizes them using 'ggplot2'.

Usage

vis_palette(palette_list)

Arguments

palette_list

A (named) list of color palettes. Each element of the list should be a vector of color codes, optionally with names.

Details

The colour palettes inside the list can be named, as can be the individual colours. The names are then displayed in the swatch plot.

Value

A 'ggplot' object visualizing the color palettes.

Examples

palettes <- list(
  palette1 = c(moc = "#FF0000", trochu = "#00FF00", malo = "#0000FF"),
  palette2 = c("#FFFF00", "#FF00FF", "#00FFFF")
)
vis_palette(palettes)

petrbouchal/ptrr documentation built on Oct. 10, 2024, 7:21 a.m.