Mix (blend) two colors specified as text. This is high-level function based on the mixcolor.

mixcol(col1, col2, alpha = 0.5)

Arguments

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 1-alpha of col1 with an amount alpha of col2.

Value

textual representation of the mixed color

See also

Examples

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')