mixcol | R Documentation |
Mix (blend) two colors specified as text. This is high-level function
based on the mixcolor
.
mixcol(col1, col2, alpha = 0.5)
col1 |
the first color (a character vector or an integer color code) |
col2 |
the second color (a character vector or an integer color code) |
alpha |
the mixed color is obtained by combining an amount
|
textual representation of the mixed color
Tomas Sieger
mixcolor
,
col2rgb
,
RGB
,
rgb2hex
.
col1<-mixcol('yellow','black',0)
col2<-mixcol('yellow','black', .25)
col3<-mixcol('yellow','black', .5)
col4<-mixcol('yellow','black', .75)
col5<-mixcol('yellow','black',1)
plot(0:4,rep(0,5),xlim=c(-.5,5.5),ty='p',pch=21,cex=15,col='black',
bg=c(col1,col2,col3,col4,col5),frame=FALSE,xlab='',ylab='',xaxt='n',yaxt='n')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.