find_similar_colour {ibawds} | R Documentation |
Find a Named Colour that is Similar to Any Given Colour
Description
Find the named colour that is most similar to a given colour.
Usage
find_similar_colour(
colour,
distance = c("euclidean", "manhattan"),
verbose = interactive()
)
Arguments
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. |
Value
a character of length one with the name of the most similar named colour.
Examples
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")
[Package ibawds version 0.6.0 Index]