Convert colors to grayScale using luminance weighting.
Examples
op <- par(no.readonly = TRUE)
par(mfcol=c(2,2))
tmp <- 1:3
names(tmp) <- c('red','green','blue')
barplot(tmp, col=c('red','green','blue'))
barplot(tmp, col=grayScale(c('red','green','blue')))
barplot(tmp, col=c('red','#008100','#3636ff'))
barplot(tmp, col=grayScale(c('red','#008100','#3636ff')))
par(op)
