Fill a native raster image with the given color

nr_fill(nr, color)

Arguments

nr

native raster image

color

Color as a character string. Either a standard R color (e.g. 'blue', 'white') or a hex color of the form #rrggbbaa, #rrggbb, #rgba or #rgb

Value

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

Examples

nr <- nr_new(400, 300, 'hotpink')
nr_fill(nr, 'blue')
plot(nr)