interface RangeOptions {
    hue?: "raw" | "increasing" | "decreasing" | "longer" | "shorter";
    outputSpace?: string | Space;
    premultiplied?: boolean;
    progression?: ((percentage) => number);
    space?: string | Space;
}

Hierarchy (view full)

Properties

hue?: "raw" | "increasing" | "decreasing" | "longer" | "shorter"

Inspired by the hue-adjuster in CSS Color 5.

outputSpace?: string | Space
premultiplied?: boolean
progression?: ((percentage) => number)

Used to customize the progression and make in nonlinear

Type declaration

    • (percentage): number
    • Parameters

      • percentage: number

      Returns number

Example

let r = new Color("lch(50 50 0)").range("lch(90 50 20)");
Color.range(r, { progression: p => p ** 3 });
space?: string | Space

The interpolation space. Colors do not need to be in this space; they will be converted for interpolation