Description Usage Arguments Value Examples
Finds a color between those received as input in HSV palette
1 | hsv_weighted_mean(col1, col2, w1 = 0.5, w2 = 1 - w1, output = "hex")
|
col1 |
First color. Hexcode, c(r,g,b), color name as character and "color" class object are all supported. |
col2 |
Second color. Hexcode, c(r,g,b), color name as character and "color" class object are all supported. |
w1 |
Number between 0 and 1. Represents how similar the output will be to col1. Defaults to .5 |
w2 |
Number between 0 and 1. Represents how similar the output will be to col2. Defaults to 1-w1 |
output |
Format in which output will be returned. Use "hex" to get a hexcode. Use "color" for a "color" class object to be returned. Defaults to "hex" |
A hexcode (or "class" color object) built as commanded.
1 2 3 4 5 | hsv_weighted_mean("red", "green", output="color")
hsv_weighted_mean("red", "green")
hsv_weighted_mean("blue", "red", w1=5/6)
hsv_weighted_mean(c(0,0,0), color("white"))
hsv_weighted_mean("#000000", "red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.