View source: R/utils_mapedit.R
custom_palette | R Documentation |
This function generates a custom color palette using the specified colors and number of colors.
custom_palette(
colors = c("#4B0055", "#00588B", "#009B95", "#53CC67", "yellow"),
n = 100
)
colors |
A vector of colors to create the color palette. Default is c("steelblue", "salmon", "forestgreen"). |
n |
The number of gradient colors in the color palette. Default is 100. |
A vector of colors representing the custom color palette.
# Generate a custom color palette with default colors and 10 colors
custom_palette()
# Generate a custom color palette with specified colors and 20 colors
custom_palette(colors = c("blue", "red"), n = 20)
# example code
library(pliman)
custom_palette(n = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.