ixfx
    Preparing search index...

    Function createSteps

    Creates discrete colour steps between two colours.

    Start and end colours are included (and counted as a step) unless exclusive is set to true

    // Array of five HslScalar 
    createSteps(`red`,`blue`, { steps: 5 });

    Defaults to the oklch colour space, 5 steps and non-exclusive.

    • Type Parameters

      • T extends Partial<
            {
                direction: "longer"
                | "shorter";
                exclusive: boolean;
                space: ColourSpaces;
                steps: number;
            },
        >

      Parameters

      Returns T extends { space: "oklch" }
          ? OkLchScalar[]
          : T extends { space: "srgb" }
              ? RgbScalar[]
              : T extends { space: "hsl" } ? HslScalar[] : OkLchScalar[]