col_gray: col_gray

Description Usage Arguments See Also Examples

Description

Convert a given RGB color to gray-scale

Usage

1
col_gray(rgb, method = "yprime")

Arguments

rgb

numeric vector in [0, 1]^3

method

either "yprime", "average", or "lightness". "yprime" attempts to approximate human vision, "average" simply takes the average of rgb and assigns this to all RGB values, "lightness" takes the average of the range of rgb.

See Also

col_dens, col_mult, col_fade

Examples

1
col_gray(c(0.8, 0.1, 0.8), "yprime")

mickwar/mwBASE documentation built on May 22, 2019, 9:56 p.m.