Preparing search index...
    GradientParameters: {
        distance(from: GradientParameters, to: GradientParameters): number;
        lerp(
            from: GradientParameters,
            to: GradientParameters,
            t: number,
        ): GradientParameters;
    }

    Type declaration

    • distance: function
      • Computes a normalized difference [0, 1] between two gradient parameter sets. Considers enabled, type, start/end, and all stops. For colors, compares HSV with circular hue distance and alpha. Returns the maximum component-wise difference to reflect the most significant change.

        Returns number

    • lerp: function
      • Interpolates between two gradient parameter sets.

        • t is clamped to [0, 1].
        • Colors are interpolated in HSV space using the shortest hue path; alpha is linear.
        • For non-stop fields (enabled, type, start, end), values prefer 'to' when defined, otherwise use 'from'.
        • For stops: when both exist they are interpolated; if only 'to' exists it fades in with t as alpha; if only 'from' exists it fades out.

        Parameters

        Returns GradientParameters