Description Usage Arguments Details Value Author(s) Examples
Change the charactistics of a color or vector of colors
1 2 3 4 | SetOpacity(color,opacity)
SetHue(color,hue)
SetSaturation(color,saturation)
SetValue(color,value)
|
color |
a vector of colors |
opacity |
a vector of new opacity values |
hue |
a vector of new hues |
saturation |
a vector of new saturations |
value |
a vector of new values |
These functions accept colors specified by name (e.g. "red") or hex codes (e.g. "FF0000"). If the color argument and the other argument both have length n, then each color will be assigned the corresponding new opacity, hue, saturation or value. Otherwise, at least one of the arguments should have length 1, in which case each it will be recycled to length n.
A vector of colors of length n.
Brody Sandel
1 2 3 4 5 6 7 8 9 10 | TestPalette(SetOpacity("red",seq(0,1,0.02)))
TestPalette(SetHue("red",seq(0,1,0.02)))
TestPalette(SetSaturation("red",seq(0,1,0.02)))
TestPalette(SetValue("red",seq(0,1,0.02)))
x = runif(200)
y = runif(200)
color = SetHue("red",x)
color = SetValue(color,y)
plot(x,y,col = color,pch = 16,cex = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.