ixfx
    Preparing search index...

    Function interpolatorDual

    • Returns a function that interpolates between two colours. Returns structured colour values. If you want the result as a ready-to-use CSS string, use interpolatorDualToString instead.

      By default takes a shorter direction and uses the OkLCH colourspace.

      const i = interpolator(`blue`, `red`);
      i(0.5); // Get the colour at 50%, as a Colour structure.

      If you want to create discrete steps, consider createSteps or scale.

      Parameters

      Returns (amount: number) => Colour.Colour

      Function that interpolates between two colours, returning a structured Colour