View source: R/distance-palette.R
pth_data_cat_euclid | R Documentation |
You can evaluate distance for categorial palettes (_cat
functions), or for
quantitative functions (_qnt
functions). You can evaluate using Euclidean
distance in a color space (_euclid
functions), or using a metric
(_metric
functions).
pth_data_cat_euclid(color, ...) ## Default S3 method: pth_data_cat_euclid(color, ...) ## S3 method for class 'character' pth_data_cat_euclid( color, cvd = pth_cvd_grid_severity(), transformer = NULL, non_luminance_weight = 1, ... ) ## S3 method for class 'pth_hex' pth_data_cat_euclid( color, cvd = pth_cvd_grid_severity(), transformer = NULL, non_luminance_weight = 1, ... ) ## S3 method for class 'pth_mat' pth_data_cat_euclid( color, cvd = pth_cvd_grid_severity(), transformer = NULL, non_luminance_weight = 1, ... ) pth_data_cat_metric(color, ...) ## Default S3 method: pth_data_cat_metric(color, ...) ## S3 method for class 'character' pth_data_cat_metric( color, cvd = pth_cvd_grid_severity(), method = c("cie2000", "cie94", "cie1976", "cmc"), ... ) ## S3 method for class 'pth_hex' pth_data_cat_metric( color, cvd = pth_cvd_grid_severity(), method = c("cie2000", "cie94", "cie1976", "cmc"), ... ) ## S3 method for class 'pth_mat' pth_data_cat_metric( color, cvd = pth_cvd_grid_severity(), method = c("cie2000", "cie94", "cie1976", "cmc"), ... ) pth_data_qnt_euclid(palette, ...) ## Default S3 method: pth_data_qnt_euclid(palette, ...) ## S3 method for class 'pth_palette' pth_data_qnt_euclid( palette, n_step = 12, cvd = pth_cvd_grid_severity(), transformer = NULL, non_luminance_weight = 1, ... ) pth_data_qnt_metric(palette, ...) ## Default S3 method: pth_data_qnt_metric(palette, ...) ## S3 method for class 'pth_palette' pth_data_qnt_metric( palette, n_step = 12, cvd = pth_cvd_grid_severity(), method = c("cie2000", "cie94", "cie1976", "cmc"), ... )
color |
Object that can be coerced into colors,
i.e. |
... |
additional arguments passed on to |
cvd |
|
transformer |
|
non_luminance_weight |
|
method |
|
palette |
|
n_step |
Object coerced to |
tbl_df
with columns:
character
hex-code of original color.
character
hex-code of original color.
character
type of color-vision deficiency.
numeric
indicates severity using scale 0-1.
character
hex-code of color under CVD.
character
hex-code of color under CVD.
numeric
perceptual distance between colors
Each row describes an interaction between two colors in a palette.
For a categorical palette (_cat
functions), each color in the palette is
compared with all the colors in the palette; for n
colors, a tibble
with n^2
rows is returned.
For a quantitative palette (_qnt
functions), the palette is discretized;
each color is compared with its neighbors. A data frame with n_step
rows is
returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.