pev_fcont_diverging: Create continuous-palette function from HCL parameters

Description Usage Arguments Value Examples

View source: R/continuous.R

Description

Create continuous-palette function from HCL parameters

Usage

1
pev_fcont_diverging(.fcont_low, .fcont_high)

Arguments

.fcont_low

object that can be coerced to pev_fcont, similar to .fcont, used for the low end of a diverging scale. Low end of this scale becomes the middle of the diverging scale.

.fcont_high

object that can be coerced to pev_fcont, similar to .fcont, used for the high end of a diverging scale. Low end of this scale becomes the middle of the diverging scale.

Value

function with S3 class pev_fcont, when called with a numeric vector with values between 0 and 1, returns the corresponding (hex-code) values.

Examples

1
2
3
4
5
6
  # Create sequential-palette functions
  fcont_purple <- pev_fcont("Purples 3")
  fcont_green <- pev_fcont("Greens 3")

  # Create diverging-palette function
  pev_fcont_diverging(fcont_purple, fcont_green)

ijlyttle/paleval documentation built on Dec. 25, 2019, 9:17 a.m.