distance: Colour distance

Description Usage Arguments Value Author(s) References Examples

Description

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.

Usage

1
distance(shades, reference)

Arguments

shades

One or more colours, in any suitable form (see shade).

reference

A single reference colour.

Value

A numeric vector of distances.

Author(s)

Jon Clayden <code@clayden.org>

References

http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CIE2000.html

Examples

1
distance(c("red","green","blue"), "red")

shades documentation built on Aug. 2, 2019, 5:05 p.m.