colordiff {ColorNameR}R Documentation

Get the color difference between values in the CIELab color space.

Description

Get the color difference between values in the CIELab color space.

Usage

colordiff(color, reference, metric = "CIEDE2000", ...)

Arguments

color

A matrix whose rows specify color coordinates in the CIELab color space.

reference

A reference color.

metric

The color metric, between CIE76, CIE94, and CIEDE2000.

...

Weighting factors k_L, k_C, k_H, K1, and/or K2 for CIE94 and CIEDE2000, if applicable. Also, symmetric=TRUE to use a symmetric version of CIE94.

Value

The color difference between the two given values.

References

Sharma, G., & Bala, R. (Eds.). (2017). Digital color imaging handbook. CRC press. Sharma, G., Wu, W., & Dalal, E. N. (2005). The CIEDE2000 color-difference formula: Implementation notes, supplementary test data, and mathematical observations. Color Research & Application: Endorsed by Inter-Society Color Council, The Colour Group (Great Britain), Canadian Society for Color, Color Science Association of Japan, Dutch Society for the Study of Color, The Swedish Colour Centre Foundation, Colour Society of Australia, Centre Français de la Couleur, 30(1), 21-30.

Examples

colordiff(rbind(c(50, 2.6772, -79.7751),
                c(50, 3.1571, -77.2803),
                c(50, 2.8361, -74.0200)), c(50, 0, -82.7485))
colordiff(rbind(c(50, 2.6772, -79.7751),
                c(50, 3.1571, -77.2803),
                c(50, 2.8361, -74.0200)), c(50, 0, -82.7485), metric="CIE94")
colordiff(rbind(c(50, 2.6772, -79.7751),
                c(50, 3.1571, -77.2803),
                c(50, 2.8361, -74.0200)), c(50, 0, -82.7485), metric="CIE94", symmetric=TRUE)

[Package ColorNameR version 0.1.0 Index]