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("yellow", "#53CC67", "#009B95", "#00588B", "#4B0055"),
  n = 5
)

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)


TiagoOlivoto/pliman documentation built on Sept. 14, 2024, 2:24 a.m.