distance | R Documentation |
This function calculates a distance measure that aims to quantify the perceptual difference between a vector of colours and a reference colour. The measure in question is the CIE Delta E (2000), which is calculated based on colour coordinates in Lab space.
distance(shades, reference)
shades |
One or more colours, in any suitable form (see
|
reference |
A single reference colour. |
A numeric vector of distances.
Jon Clayden code@clayden.org
http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CIE2000.html
distance(c("red","green","blue"), "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.