Skip to contents

This internal function will take as an input either a) the name of a palete ( one of fsr_primary_colors, fsr_secondary_colors, or bsvr_color) or b) the palette itself as a vector of hex codes representing the colors. In turn, it will return a function f(n) that produces a vector containing the first n colors of the input palette. Optionally, it can use the input palette to generate a color ramp, so it can produce as many colors as required.

Usage

fed_color_pal(palette = "fsr_primary", use_ramp = FALSE, reverse = FALSE, ...)

Arguments

palette

Character name of palette in fed_color_palettes

use_ramp

Boolean indicating whether to use a color ramp to interpolate colors (via grDevices::colorRampPalette)

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments to pass to colorRampPalette()

Value

function