R/col2grey.R

Defines functions col2grey col2gray

Documented in col2gray col2grey

col2grey <- function(cols){
    rgb <- col2rgb(cols)
    gry <- rbind( c(0.3, 0.59, 0.11) ) %*% rgb
    rgb(gry,gry,gry, maxColorValue=255)
}

col2gray <- function(cols){
    col2grey(cols)
}

Try the TeachingDemos package in your browser

Any scripts or data that you put into this service are public.

TeachingDemos documentation built on April 2, 2020, 3:01 a.m.