Description Usage Arguments Value Author(s) Examples
Creates a mixture between pairs of colors by averaging their red/green/blue components (RGB mode), or hue/saturation/value components (HSV mode)
1 |
color1 |
A color or vector of colors, either specified by name (e.g. "red") or hex code (e.g. "FF0000") |
color2 |
A second color or vector of colors. If color1 and color2 are not the same length, but one is an integer multiple of the other, the shorter one will be recycled. |
mode |
Either "RGB" or "HSV", specifies whether to find the intermediate color in RGB space or HSV space. |
circular |
If using mode = "HSV", specifies whether to ramp between hues using circular means. This is usually a good idea because hues are essentially circular (a hue of 0.01 is very similar to 0.99). |
A color
Brody Sandel
1 2 3 4 5 6 | TestPalette(Mix("Red","Yellow"))
TestPalette(c("Red",Mix("Red","Yellow"),"Yellow"))
TestPalette(c("salmon",Mix("salmon","turquoise"),"turquoise"))
TestPalette(c("salmon",Mix("salmon","turquoise",mode = "HSV"),"turquoise"))
TestPalette(Mix(rainbow(10),terrain.colors(10)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.