Get perceptual-derivative of continuous-palette

pev_data_derivative(.fcont, n_panel = 40, method = "cie2000",
  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.

n_panel

numeric, number of panels into which to discretize the palette-function.

method

character, describes how the domain of the continuous palette is to be discretized, can be "post" or "panel" (using a fencing analogy).

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, d_distance_d_x

Examples

pev_data_derivative("Viridis")
#> # A tibble: 164 x 4 #> cvd x hex d_distance_d_x #> <chr> <dbl> <chr> <dbl> #> 1 none 0 #FDE333 139. #> 2 none 0.025 #EFE32D 127. #> 3 none 0.05 #E1E22B 121. #> 4 none 0.075 #D2E02E 126. #> 5 none 0.1 #C2DE34 128. #> 6 none 0.125 #B2DC3C 126. #> 7 none 0.15 #A2D945 128. #> 8 none 0.175 #90D74E 130. #> 9 none 0.2 #7ED357 126. #> 10 none 0.225 #6AD05F 126. #> # … with 154 more rows