pev_data_hcl_ref: Get minimum perceptual-distance from reference color

Description Usage Arguments Value Examples

View source: R/pev_data_hcl_ref.R

Description

An approximation, for now.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
pev_data_hcl_ref(.fpal, hex_ref, n = NULL, method = "cie2000",
  include_cvd = TRUE, ...)

## Default S3 method:
pev_data_hcl_ref(.fpal, hex_ref, n = NULL,
  method = "cie2000", include_cvd = TRUE, ...)

## S3 method for class 'character'
pev_data_hcl_ref(.fpal, hex_ref, n = NULL,
  method = "cie2000", include_cvd = TRUE, ...)

## S3 method for class 'pev_fcont'
pev_data_hcl_ref(.fpal, hex_ref, n = NULL,
  method = "cie2000", include_cvd = TRUE, ...)

## S3 method for class 'pev_funbounded'
pev_data_hcl_ref(.fpal, hex_ref, n = NULL,
  method = "cie2000", include_cvd = TRUE, ...)

## S3 method for class 'pev_fbounded'
pev_data_hcl_ref(.fpal, hex_ref, n = NULL,
  method = "cie2000", include_cvd = TRUE, ...)

Arguments

.fpal

palette-function.

hex_ref

character vector of hex-colors

n

integer, number of points to discretize the range (0, 1) of the palette-function to determine the minimum perceptual-distance.

method

character method to use for distance calculation, passed to farver::compare_color(). One of: "euclidean", "cie1976", "cie94", "cie2000", or "cmc".

include_cvd

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

...

other args (not used)

Value

data.frame with variables cvd, x_nearest, distance_nearest, hex, hex_ref, hue, chroma, luminance.

Examples

1
  pev_data_hcl_ref("Viridis", "#008F97")

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