R/col2grey.R

Defines functions col2gray col2grey

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 May 29, 2024, 5:59 a.m.