getAvgHex | R Documentation |
This function computes the average color of the provided hex color values.
getAvgHex(...)
... |
Hex color values as character strings. Could also be any number of character vectors (including lists) which will all be coerced into one character, assuming they are valid hex codes. |
A single hex color character representing the average of the input colors.
https://stackoverflow.com/questions/649454
getAvgHex("#000000", "#FF00FF")
getAvgHex(c("#008040", "#000000", "#FF00FF"))
# very nonstandard but possible way to input hexes. Essentially,
# any combination of vectors will work.
getAvgHex(list("#008040", "#000000"), "#FF00FF", c("#FF00FF"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.