Learn R Programming

roloc (version 0.1-2)

euclideanLUV: Euclidean colour metrics

Description

Colour metrics that calculate euclidean distance between colours in different colour spaces.

Usage

euclideanLUV(colour, colourList, tolerance = Inf)
euclideanRGB(colour, colourList, tolerance = Inf)
euclideanDistance(spec, list, tolerance)

Value

The colour metrics return a matrix of distances, with one row per colour specification and one column per colour name.

Arguments

colour

An "sRGB" colour object representing colours to find a match for.

colourList

An "sRGB" colour object representing a list of colours to find a match within.

tolerance

A numeric value indicating a range beyond which matches will not be accepted.

spec

A single colour specification, as an RGB vector of three values.

list

A list of colours, as an RGB matrix with three columns.

Author

Paul Murrell

Details

euclideanLUV() calculates euclidean distance in the CIE Luv colour space.

euclideanRGB() calculates euclidean distance in the sRGB colour space.

euclideanDistance() is provided as a helper for defining euclidean metrics in other colour spaces.