Skip to content

Commit

Permalink
in 'changeColors()', resample colors using 'colorRampPalette()'
Browse files Browse the repository at this point in the history
  • Loading branch information
dfriend21 committed Nov 24, 2024
1 parent cfd2266 commit 8861561
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/changeColors.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ", ")
Expand Down

0 comments on commit 8861561

Please sign in to comment.