distance: Colour distance

distanceR Documentation

Colour distance

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

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

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

jonclayden/shades documentation built on Oct. 17, 2024, 4:52 p.m.