doypa_palette {DOYPAColors}R Documentation

Create a DOYPAColors color palette function

Description

This function creates a function that generates a color vector or ramp of n colors for a specified DOYPAColors palette.

Usage

doypa_palette(palette = NULL, reverse = FALSE, ramp = FALSE)

Arguments

palette

Character string specifying the desired palette name. Available palettes: list_doypa_pals().

reverse

Logical. If 'TRUE', reverses the order of colors in the palette.

ramp

Logical. If 'TRUE', the returned function generates a color ramp (interpolation) instead of a vector of colors.

Value

A function that generates a vector of 'n' colors or a color ramp.

Examples

# Create a function for generating colors from the "buzz" palette
get_buzz_palette <- doypa_palette(palette = "buzz")
colors <- get_buzz_palette(5)
preview_doypa_pals(colors = colors, palette = "buzz")

[Package DOYPAColors version 0.0.1 Index]