viewpals: Display colors associated with a palette

View source: R/viewpals.R

viewpalsR Documentation

Display colors associated with a palette

Description

A quick way to view fishpals' color palettes

Usage

viewpals(fishpal = "cfs", labels = TRUE, borders = NULL, cex_label = 0.75)

Arguments

fishpal

a string matching one of the fishpals color palettes (see fishpals::fish_pals for the full list). The default is "cfs"

labels

boolean, whether to show the hexadecimal representation of the colours in each tile

borders

color of the borders of the tiles; matches the border argument of graphics::rect(). The default means par("fg"). Use border = NA to omit borders.

cex_label

size of printed labels, works the same as cex parameter of plot()

Details

Adapted from the scales package (https://cran.r-project.org/web/packages/scales/index.html) for use with fishpals

Examples

viewpals("genidaqs")
viewpals("adultchinook")

fishsciences/fishpals documentation built on July 11, 2022, 12:32 a.m.