Skip to contents

Maps continuous values to an interpolated colors gradient.

Usage

palette_color_continuous(
  colors = NULL,
  domain = NULL,
  midpoint = NULL,
  missing = "#DDDDDD"
)

Arguments

colors

A vector of colors that values will be mapped to. If NULL (the default), uses YlOrRd (see grDevices::hcl.colors()).

domain

A numeric range specifying the possible values that can be mapped.

midpoint

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

missing

The color to return for NA values.

Value

A palette function that when called with a single argument (a numeric vector of continuous values) returns a character vector of colors.