@OPEN-KAPPA/COLORS
    Preparing search index...

    Class InterpolationAbstract

    Interpolation functions.

    Index

    Methods

    • Interpolates between two colors using a Quadratic Bezier curve to preserve vibrancy.

      Type Parameters

      Parameters

      • c1: C

        Start color

      • c2: C

        End color

      • weight: number

        Position (0.0 to 1.0)

      • Optionalopts: BezierColorOpts

        The options.

      Returns C

      The interpolated color.

      If the two colors are of different space, which is impossible if typing is respected.

    • Compute a bilinear interpolation between four colors.

      Type Parameters

      Parameters

      • c1: C

        Top-Left color.

      • c2: C

        Top-Right color.

      • c3: C

        Bottom-Left color.

      • c4: C

        Bottom-Right color.

      • u: number

        The horizontal factor (0-1).

      • v: number

        The vertical factor (0-1).

      • Optionalopts: Partial<LinearColorOpts>

        The linear interpolation options.

      Returns C

      The interpolated color.

    • Compute a spline interpolation between a set of colors. Uses Catmull-Rom spline on each channel, correctly handling Hue wrapping if present.

      Type Parameters

      Parameters

      • c0: C

        The first color.

      • c1: C

        The first color.

      • c2: C

        The first color.

      • c3: C

        The first color.

      • t: number

      Returns C

      The interpolated color.