doypa {DOYPAColors} | R Documentation |
Get a DOYPAColors color palette
Description
This function generates a color vector of n colors for a specified palette.
Usage
doypa(palette = NULL, n = NULL, reverse = FALSE, ramp = FALSE)
Arguments
palette |
Character string specifying the desired palette name. Available palettes: list_doypa_pals(). |
n |
Number of colors needed. |
reverse |
Logical. If 'TRUE', reverses the order of colors in the palette. |
ramp |
Logical. If 'TRUE', returns a color ramp (interpolation) instead of a vector of colors. |
Value
A vector of 'n' colors.
See Also
'list_doypa_pals' to list available palettes. 'preview_doypa_pals' to preview color palettes.
Examples
# Generate a random color palette
color_palette <- doypa()
preview_doypa_pals(colors = color_palette)
# Generate a color palette of 5 colors using the "buzz" palette
color_palette <- doypa(palette = "buzz", n = 5)
preview_doypa_pals(colors = color_palette, palette = "buzz")
[Package DOYPAColors version 0.0.1 Index]