ramp: Load preset color ramps and palettes

View source: R/pkRamp.r

rampR Documentation

Load preset color ramps and palettes

Description

Load color ramps and palettes from presets. Identical to pkrf::pal() besides some argument defaults.

Usage

ramp(
  name = "parula",
  number = NULL,
  reversed = F,
  random = F,
  center = 0.5,
  show = F,
  collapse = F
)

pkRamp(
  name = "parula",
  number = NULL,
  reversed = F,
  random = F,
  center = 0.5,
  show = F,
  collapse = F
)

Arguments

name

Name of the color ramp (string).

number

Number of output colors desired (integer). Defaults to number of colors in the pallete for qualitative type and to 100 for sequential and diverging types.

reversed

Reverse the output color order (logical).

random

Randomize output color order (logical).

center

Relative position of the center of the color ramp (numeric, 0-1). Useful to change centerpoint of diverging scales.

show

Show a plot of all available color ramps (logical).

collapse

Print a single comma-separated and quoted string of colors to stdout

Value

Vector with hex colors strings.


kraaijenbrink/pkrf documentation built on July 4, 2023, 10:16 p.m.