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

    Class HarmonyAbstract

    Harmonic color generation. Usually the preferred color space is HSL.

    Index

    Constructors

    Methods

    • Generates colors adjacent to the base color on the color wheel. Usually creates a calm and comfortable design.

      Type Parameters

      Parameters

      • color: C

        The input color.

      • angle: number = 30

        The angle to apply.

      Returns [C, C, C]

      [base - angle, base, base + angle]

    • Generates the opposite color on the wheel. High contrast, hard to use in large quantities, best for accents.

      Type Parameters

      Parameters

      • color: C

        The input color.

      Returns [C, C]

      [base, base + 180]

    • Generates a variation of the complementary color scheme. Instead of the opposite color, uses the two adjacent to the opposite. High contrast but less tension than complementary.

      Type Parameters

      Parameters

      • color: C

        The input color.

      • angle: number = 30

        The rotation angle.

      Returns [C, C, C]

      [base, base + 150, base + 210] (assuming 30deg offset)

    • Generates four colors spaced evenly around the color wheel (Square). Works best if you let one color be dominant.

      Type Parameters

      Parameters

      • color: C

        The input color.

      Returns [C, C, C, C]

      [base, base + 90, base + 180, base + 270]

    • Generates three colors evenly spaced around the color wheel. Offers high contrast while retaining harmony.

      Type Parameters

      Parameters

      • color: C

        The input color.

      Returns [C, C, C]

      [base, base + 120, base + 240]