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

    Function deltaECMC

    • Calculates the CMC l:c color difference (Delta E) between two colors.

      This function implements the Color Measurement Committee (CMC) color difference formula, which provides improved perceptual uniformity compared to CIE76, especially for textiles. The formula uses different weighting functions for lightness, chroma, and hue to better match human perception.

      The calculation includes the following steps:

      1. Calculate the differences in L, C, and H components
      2. Calculate weighting functions S_L, S_C, and S_H
      3. Apply the final formula with the specified tolerances

      The default tolerances (kL=2, kC=1) correspond to the standard CMC 2:1 formula commonly used for acceptability testing.

      Parameters

      • color: LChColor

        The first color in LCh space

      • sample: LChColor

        The second color in LCh space to compare against

      • Optionaltolerances: DeltaECMCTolerances = ...

        The tolerance factors for lightness and chroma

      Returns number

      The color difference value (Delta E)