addFade | R Documentation |
Make existing colors fade away to white
addFade(col, fade = 0.3, target = "white", ...)
col |
Vector of color names ( |
fade |
Level of fading towards target. between 0 (target) and 1 (col). Can also be a vector. DEFAULT: 0.3 |
target |
Target color that should be faded into. DEFAULT: "white" |
... |
Further arguments passed to |
character matrix with hexadecimal color codes.
Berry Boessenkool, berry-b@gmx.de, Feb 2016
addAlpha
, colorRamp
, colors
plot(1:11, pch=16, cex=3, col=addFade(2, 10:0/10))
plot(1:11, pch=16, cex=3, col=addFade(2, 10:0/10, target="blue"))
plot(1:11, pch=16, cex=3, col=addFade(2, 10:0/10, target=3:4))
plot(1:21, pch=16, cex=3, col=addFade(2:3, 10:0/10))
plot(1:21, pch=16, cex=3, col=addFade(2:3, 10:0/10, target=4:5))
NewColors <- addFade(c("red","blue","yellow","green", "purple"), 0:200/200)
plot(runif(1000), col=NewColors, pch=16, cex=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.