This function generates a custom color palette using the specified colors and number of colors.
Usage
custom_palette(
colors = c("yellow", "#53CC67", "#009B95", "#00588B", "#4B0055"),
n = 5
)
Examples
# Generate a custom color palette with default colors and 10 colors
custom_palette()
#> [1] "#FFFF00" "#53CC67" "#009B95" "#00588B" "#4B0055"
# Generate a custom color palette with specified colors and 20 colors
custom_palette(colors = c("blue", "red"), n = 20)
#> [1] "#0000FF" "#0D00F1" "#1A00E4" "#2800D6" "#3500C9" "#4300BB" "#5000AE"
#> [8] "#5D00A1" "#6B0093" "#780086" "#860078" "#93006B" "#A1005D" "#AE0050"
#> [15] "#BB0043" "#C90035" "#D60028" "#E4001A" "#F1000D" "#FF0000"
# example code
library(pliman)
custom_palette(n = 5)
#> [1] "#FFFF00" "#53CC67" "#009B95" "#00588B" "#4B0055"