View source: R/find_similar_colour.R
find_similar_colour | R Documentation |
Find the named colour that is most similar to a given colour.
find_similar_colour(
colour,
distance = c("euclidean", "manhattan"),
verbose = interactive()
)
colour |
a colour specified in one of three forms: a hexadecimal string
of the form |
distance |
character indicating the distance metric to be used. |
verbose |
should additional output be produced? This shows the RGB values for the input colour, the most similar named colour and the difference between the two. |
a character of length one with the name of the most similar named colour.
find_similar_colour("#d339da")
find_similar_colour(c(124, 34, 201))
# suppress additional output
find_similar_colour("#85d3a1", verbose = FALSE)
# use Manhattan distance
find_similar_colour(c(124, 34, 201), distance = "manhattan")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.