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

    Function deltaE

    • Calculates the color difference (Delta E) between two colors based on the provided algorithm.

      Parameters

      • color: string | Color

        The first color input, which is parsed for calculation.

      • sample: string | Color

        The second color input, which is parsed for calculation.

      • Optionalalgorithm: DeltaEAlgorithm = '2000'

        The Delta E algorithm to use for the calculation. Supported values include: - 'Euclidean': Basic Euclidean distance (Delta E76). - 'CMC': Color Measurement Committee (CMC) method. - '2000': Delta E based on CIEDE2000. - 'OKLab': Delta E based on OKLab color space. - 'ScaledOKLab': Scaled version of Delta E in OKLab color space. - 'Jz': Delta E in JzCzHz color space.

      Returns number

      The computed color difference value using the specified algorithm.

      Throws an error if an unknown algorithm is provided.