@dragonspark/chroma-kit
    Preparing search index...

    Function deltaE2000

    • Calculates the CIEDE2000 color difference (Delta E) between two colors.

      This function implements the CIEDE2000 color difference formula, which is the most advanced and perceptually accurate Delta E calculation method standardized by the CIE. It provides significant improvements over earlier formulas, especially for blue colors and neutral colors.

      The calculation involves multiple steps:

      1. Calculate chroma values and apply corrections
      2. Calculate hue angles with appropriate handling of edge cases
      3. Calculate lightness, chroma, and hue differences
      4. Calculate weighting functions for each component
      5. Apply the final formula with rotation term for improved accuracy in blue regions

      Parameters

      • color: LabColor

        The first color in Lab space

      • sample: LabColor

        The second color in Lab space to compare against

      • Optionalweights: DeltaE2000Weights = ...

        The weight factors for lightness, chroma, and hue

      Returns number

      The color difference value (Delta E)