mixcolorr | R Documentation |
mixcolorr
mixes two R color strings in a given proportion. It is a wrapper
around colorspace::mixcolor()
that accepts and returns R color strings like
"red"
or"#FF0000"
. It is vectorized.
mixcolorr(alpha, col1, col2, ...)
alpha |
A numeric vector of length 1 or n with values between 0 (only col1) and 1 (only col2) indicating the mixing coefficient. |
col1 |
The first color to mix, as a name or hexadecimal code. |
col2 |
The second color to mix, as a name or hexadecimal code. |
... |
other arguments passed to |
A hexadecimal color code representing the mixed color.
colorspace::mixcolor()
grDevices::colors()
grDevices::col2rgb()
mixcolorr(0.8, "red", "gray")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.