R/vangogh_interpolate.R

Defines functions vangogh_interpolate

Documented in vangogh_interpolate

# vangogh_interpolate.R
# -----------------------
# Interpolate colors for continuous palettes

#' Interpolate a Van Gogh palette
#'
#' @param palette Vector of hex colors
#' @param n Number of colors desired
#' @export
vangogh_interpolate <- function(palette, n) {
  grDevices::colorRampPalette(palette)(n)
}

Try the vangogh package in your browser

Any scripts or data that you put into this service are public.

vangogh documentation built on Aug. 22, 2025, 1:10 a.m.