View source: R/average_colors.R
average_colors | R Documentation |
Convert a vector of colors into a single color that averages their numerical values of RGB (red-green-blue) or Lab (lightness-a-b) characteristics.
average_colors(x, method="RGB")
x |
vector of color names to average |
method |
character, specificying the color space in which to average. Currently only "RGB" is accepted. |
Solution derived from answer by stackoverflow user Deleplace at https://stackoverflow.com/questions/14482226/how-can-i-get-the-color-halfway-between-two-colors
character, the hexadecimal representation of the color
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.