def deltaE_ciede94(lab1, lab2, kH=1, kC=1, kL=1, k1=0.045, k2=0.015):
    l1, a1, b1 = np.rollaxis(lab1, -1)[:3]
    l2, a2, b2 = np.rollaxis(lab2, -1)[:3]

    dl = l1 - l2
    c1 = np.sqrt(a1 ** 2 + b1 ** 2)
    c2 = np.sqrt(a2 ** 2 + b2 ** 2)
    dc = c1 - c2
    dh_ab = np.sqrt(deltaE_cie76(lab1, lab2) ** 2 - dl ** 2 - dc ** 2)

    SL = 1
    SC = 1 + k1 * c1
    SH = 1 + k2 * c1

    ans = ((dl / (kL * SL)) ** 2 +
           (dc / (kC * SC)) ** 2 +
           (dh_ab / (kH * SH)) ** 2
           )
    return np.sqrt(ans)
Color difference according to CIEDE 94 standard
dataset/ETHPy150Open mrterry/yoink/yoink/delta_e.py/deltaE_ciede94