create_palfun: Create palette function

View source: R/create_palfun.R

create_palfunR Documentation

Create palette function

Description

Create a palette function from the implemented color palettes (or a list of custom palettes).

Usage

create_palfun(
  palette = "main",
  reverse = FALSE,
  customPalettes = NULL,
  shade = 0.5,
  ...
)

Arguments

palette

Name of the color palette (character). Use names(chresos_palettes()) to obtain the names of the implemented color palettes.

reverse

Use the selected palette in original or reversed order.

customPalettes

If desired, a named list of custom palettes with the same structure than chresos_palettes().

shade

Numeric vector in [0,1] that defines the brightness of the palettes. Values higher then 0.5 lead to brighter colors than the original shade, values lower than 0.5 lead to darker colors.

...

Additional arguments for colorRampPalette()

Value

A color palette function that returns n colors from the selected palette.


seb09/cccolr documentation built on Aug. 1, 2022, 1:49 a.m.