View source: R/ColorDifference.R
NickersonColorDifference | R Documentation |
Calculate the Nickerson Color Difference between two colors, given in Munsell HVC; see Nickerson.
NickersonColorDifference( HVC0, HVC1, symmetric=TRUE )
HVC0 |
a numeric Nx3 matrix with HVC values in the rows, or a vector that can be converted to such a matrix, by row.
|
HVC1 |
a numeric Nx3 matrix with HVC values in the rows, or a vector that can be converted to such a matrix, by row.
|
symmetric |
if |
If HVC0
=H_0,V_0,C_0 and If HVC1
=H_1,V_1,C_1 then the original Nickerson formula is:
NCD(HVC0,HVC1) = 0.4 C_0 Δ H ~+~ 6 Δ V ~+~ 3 Δ C
where Δ H = |H_0 - H_1| (on the circle),
Δ V = |V_0 - V_1| and
Δ C = |C_0 - C_1| .
Unfortunately, if HVC0
and HVC1
are swapped, the color difference is different.
The first color is considered to be the reference color and the second one is the test color.
The difference is not symmetric.
Another problem is that the difference is not continuous when the second color is a neutral gray,
for rectangular coordinates on a plane of constant V.
Both of these problems are fixed with a slightly modified formula:
NCD(HVC0,HVC1) = 0.4 \min(C_0,C_1) Δ H ~+~ 6 Δ V ~+~ 3 Δ C
For the first formula set symmetric=FALSE
and for the second formula set symmetric=TRUE
.
A numeric N-vector with the pairwise differences,
i.e. between row i of HVC0
and row i of HVC1
.
Jose Gama and Glenn Davis
Nickerson, Dorothy. The Specification of Color Tolerances. Textile Research. Vol 6. pp. 505-514. 1936.
NickersonColorDifference( '7.6P 8.9/2.2', '8P 8.2/3' ) ## [1] 6.952
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.