Computes CIELAB distance metric.
Arguments
- x
A
charactervector of colors.- metric
An
integervalue giving the year the metric was recommended by the CIE. It must be one of "1976", "1994", or "2000" (default; seespacesXYZ::DeltaE()).- diag
A
logicalscalar: should the diagonal of the distance matrix be printed?- upper
A
logicalscalar: should the upper triangle of the distance matrix should be printed?
See also
Other diagnostic tools:
change(),
plot.color_scheme(),
plot_map(),
plot_scheme(),
plot_scheme_colourblind(),
plot_tiles()
Examples
if (requireNamespace("spacesXYZ", quietly = TRUE)) {
## Trichromat
pal <- colour("bright")
compare(pal(5))
## Deuteranopia
deu <- change(pal, mode = "deuteranopia")
compare(deu(5))
## Protanopia
pro <- change(pal, mode = "protanopia")
compare(pro(5))
## Tritanopia
tri <- change(pal, mode = "tritanopia")
compare(tri(5))
## Achromatopsia
ach <- change(pal, mode = "achromatopsia")
compare(ach(5))
}
#> 1 2 3 4
#> 2 15.133194
#> 3 38.752027 19.522094
#> 4 26.072281 9.633077 10.043244
#> 5 17.098221 31.695821 56.285350 41.893242
