par(mfcol=c(2,2))
tmp <- 1:3
names(tmp) <- c('red','green','blue')
barplot( tmp, col=c('red','green','blue') )
barplot( tmp, col=col2gray( c('red','green','blue') ) )
barplot( tmp, col=c('red','#008100','#3636ff') )
barplot( tmp, col=col2grey( c('red','#008100','#3636ff') ) )
Run the code above in your browser using DataLab