Compare colour specifications to a list of colour names and return distance information for each comparison.
An R colour specification
A list of colours
A colour metric function. See the Details Section.
Arguments passed to the colour metric function.
The colour metric function must take at least two arguments,
both of which are
"RGB" colour objects (as created by
the colorspace package such as
colour, which is the colour specification to find a match for;
colourList, which represents the list of colour names to
find a match within.
Any additional arguments must have default values (so that they
do not HAVE to be specified in a call to
The colour metric function must return either a vector or
a list, the same length as the
colour argument, containing
integer indices into the colour list.
NA means the colour could not be represented in the
colour space used by the colour metric.
"unknown" means that the colour
"colourMatch" object with components for the original
colour specification, the original colour list object, and a
matric of distances between each colour specification and each
colour name in the colour list.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.