Computes CIELAB distance metric.
compare(x, metric = 2000, diag = FALSE, upper = FALSE)
A character
vector of colors.
An integer
value giving the year the metric was
recommended by the CIE. It must be one of "1976
", "1994
", or
"2000
" (default; see spacesXYZ::DeltaE()
).
A logical
scalar: should the diagonal of the distance matrix
be printed?
A logical
scalar: should the upper triangle of the distance
matrix should be printed?
N. Frerebeau
Other diagnostic tools:
convert()
,
plot()
# Trichromat
pal <- colour("bright")
(deltaE <- compare(pal(5)))
summary(deltaE)
# Deuteranopia
deu <- convert(pal, mode = "deuteranopia")
compare(deu(5))
# Protanopia
pro <- convert(pal, mode = "protanopia")
compare(pro(5))
# Tritanopia
tri <- convert(pal, mode = "tritanopia")
compare(tri(5))
# Achromatopsia
ach <- convert(pal, mode = "achromatopsia")
compare(ach(5))
Run the code above in your browser using DataLab