ColorRgbFun: Creates a color mapping function

Description Usage Arguments Value Examples

View source: R/colorpatch_impl.R

Description

Creates a color mapping function

Usage

1
ColorRgbFun(pal, xmin = -1, xmax = 1, coerce.fun = colorspace::hex)

Arguments

pal

the color palette

xmin

minimum value to be mapped to the first entry of the palette

xmax

maximum value to be mapped to the last entry of the palette

coerce.fun

the color coercing function (e.g. for ggplot2 colorspace::hex() is recommended)

Value

a function mapping a value to a color

Examples

1
2
data("OptimGreenRedLAB")
fn <- ColorRgbFun(OptimGreenRedLAB)

colorpatch documentation built on May 1, 2019, 10:28 p.m.