grayCol | R Documentation |
Take a color and make it duller
grayCol(col, grayness, darkness = 0.25)
col |
Color |
grayness |
A value between 0 and 1; 0 does nothing, 1 is completely gray |
darkness |
A value between 0 and 1, indicating the darkness of the gray color to add (0 = white, 1 = black); default 0.25 |
grayCol('red', 0.5)
plot(1:10, pch=19, col='red')
points(2:10, pch=19, col=grayCol('red', 0.5))
points(3:10, pch=19, col=grayCol('red', 0.75))
points(4:10, pch=19, col=grayCol('red', 0.75, 0.1))
points(5:10, pch=19, col=grayCol('red', 0.75, 0.5))
grayCol(c('blue', 'red', 'green'), c(0.75, 0, 0.75), darkness=0.1)
plot(1:3, pch=19, col=.Last.value)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.