custom_palette: Generate Custom Color Palette

View source: R/utils_mapedit.R

custom_paletteR Documentation

Generate Custom Color Palette

Description

This function generates a custom color palette using the specified colors and number of colors.

Usage

custom_palette(
  colors = c("#4B0055", "#00588B", "#009B95", "#53CC67", "yellow"),
  n = 100
)

Arguments

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.

Value

A vector of colors representing the custom color palette.

Examples

# 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)


pliman documentation built on Oct. 15, 2023, 1:06 a.m.