Skip to contents

Maps values to a colors.

Usage

palette_color(
  colors = NULL,
  domain = NULL,
  midpoint = NULL,
  ordered = FALSE,
  missing = "#DDDDDD",
  ...
)

Arguments

colors

A vector of colors that values will be mapped to.

domain

A numeric range or a vector of categorical data specifying the possible values that can be mapped.

midpoint

A length-one numeric vector specifying the mid-point of input range.

ordered

A logical scalar: should the levels be treated as already in the correct order?

missing

The color to return for NA values.

...

Further parameters to be passed to internal methods.

Value

A palette function that when called with a single argument returns a character vector of colors.