pev_data_distance: Get perceptual-distance of continuous-palette from reference...

Description Usage Arguments Value Examples

View source: R/distance.R

Description

Get perceptual-distance of continuous-palette from reference color

Usage

1
2
pev_data_distance(.fcont, hex_ref = NULL, n_panel = 40,
  include_cvd = TRUE)

Arguments

.fcont

object that can be coerced to pev_fcont, when called with a numeric vector with values between 0 and 1, returns the corresponding (hex-code) values.

hex_ref

character single hex-colors to act as the reference, default value is the beginning of the range of the continuous-palette, i.e. at x = 0.

n_panel

numeric number of panels into which to discretize the domain (0 to 1) of the continous-palette.

include_cvd

logical or character, indicates to include data for for color-vision deficiency. Possible character values: "none", "protan", "deutan", "tritan".

Value

data.frame with variables cvd, x, hex, hex_ref, distance

Examples

1
  pev_data_distance("Purple-Green")

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