From 8861561655f5b1369018ce22c3145b2ac238b950 Mon Sep 17 00:00:00 2001 From: Derek Friend Date: Sat, 23 Nov 2024 18:34:41 -0600 Subject: [PATCH] in 'changeColors()', resample colors using 'colorRampPalette()' --- R/changeColors.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/changeColors.R b/R/changeColors.R index 08bdfcf..612466f 100644 --- a/R/changeColors.R +++ b/R/changeColors.R @@ -71,8 +71,7 @@ changeColors <- function(map, className, colors) { ) if (length(colors) > 201) { - inds <- round(seq(0, length(colors), length.out = 201)) - colors <- colors[inds] + colors <- grDevices::colorRampPalette(colors)(201) } cols <- paste0(col2hex(colors), collapse = ", ")