ramp: Load preset color ramps and palettes

Description Usage Arguments Value

View source: R/pkRamp.r

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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 Nov. 14, 2020, 12:29 p.m.