A rescaler function is used to rescale the input to a palette function.

pth_rescaler_reverse()

Simply reverses the input.

pth_rescaler_domain()

Expands the input domain to extend from zero to one.

pth_rescaler_euclid()

Uses palette and pth_distance_euclid() to rescale the input so that the distance-change is constant.

pth_rescaler_metric()

Uses palette and pth_distance_metric() to rescale the input so that the distance-change is constant.

pth_rescaler_reverse()

pth_rescaler_domain(domain = c(0, 1))

pth_rescaler_euclid(palette, tolerance, non_luminance_weight, transformer, ...)

pth_rescaler_metric(
  palette,
  tolerance,
  method = c("cie2000", "cie94", "cie1976", "cmc")
)

Arguments

domain

numeric vector with length 2, each value between 0 and 1. Rescales to map new inputs of 0 and 1 to these values.

palette

function with S3 class pth_palette.

tolerance

numeric relative tolerance for distance calculations.

Value

function, for each input (0 <= x <= 1) returns a value (0 <= y <= 1). The function shall be monotonic.