colourName | R Documentation |
Return a colour name from a colour specification.
## S3 method for class 'colourMatch'
colourNames(x,
...)
## Default S3 method:
colourNames(x,
colourList=getOption("roloc.colourList"),
colourMetric=getOption("roloc.colourMetric"),
...)
colourName(...)
x |
A |
colourList |
A list of colours |
colourMetric |
A colour metric function. See |
... |
For |
colourNames
returns a list of colour names (possibly more than one
per colour specification).
colourName
returns a vector of colour names (only the first
match per colour specification).
Paul Murrell
# Some colours() are identical to each other
newColours <- colourName(rgb(t(col2rgb(colours())), maxColorValue=255))
repeats <- newColours != colours()
cbind(colours()[repeats], newColours[repeats])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.