# Ramp, Scales and Curves
▸ step() (opens new window)
Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The
input may be any numeric expression (e.g., ["get", "population"]). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.▸ interpolate() (opens new window)
Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The
input may be any numeric expression (e.g., ["get", "population"]). Stop inputs must be numeric literals in strictly ascending order. The output type must be number, array<number>, or color.
Interpolation types:
["linear"]: Interpolates linearly between the pair of stops just less than and just greater than the input.["exponential", base]: Interpolates exponentially between the stops just less than and just greater than the input.basecontrols the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.["cubic-bezier", x1, y1, x2, y2]: Interpolates using the cubic bezier curve defined by the given control points.
▸ interpolate-hcl() (opens new window)
Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like
interpolate, but the output type must be color, and the interpolation is performed in the Hue-Chroma-Luminance color space.▸ interpolate-lab() (opens new window)
Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like
interpolate, but the output type must be color, and the interpolation is performed in the CIELAB color space.