nr_color_replace: Replace colors in a native raster image

View source: R/nr-color.R

nr_color_replaceR Documentation

Replace colors in a native raster image

Description

Replace colors in a native raster image

Usage

nr_color_replace(nr, old, new)

Arguments

nr

native raster image

old

Vector of old colors

new

Vector of replacement colors

Value

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

See Also

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

Examples

nr <- nr_new(10, 10, 'hotpink')
nr_color_replace(nr, 'hotpink', 'grey80')
plot(nr)

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