nr_desaturate: Move image colors to gray

View source: R/nr-color.R

nr_desaturateR Documentation

Move image colors to gray

Description

Move image colors to gray

Usage

nr_desaturate(nr, factor = 1)

Arguments

nr

native raster image

factor

desaturation factor. Default: 1 (fully desaturate)

Value

Invisibly return the supplied native raster image which was been modified in-place

See Also

Other color manipulation functions: nr_color_replace(), nr_dither(), nr_threshold()

Examples

plot(deer[[1]])
nr <- deer[[1]] |> nr_copy()

nr_desaturate(nr)
plot(nr)

nara documentation built on May 28, 2026, 5:07 p.m.