def deltaE_ciede94(lab1, lab2, kH=1, kC=1, kL=1, k1=0.045, k2=0.015):
 (L1, C1) = np.rollaxis(lab2lch(lab1), (-1))[:2]
 (L2, C2) = np.rollaxis(lab2lch(lab2), (-1))[:2]
 dL = (L1 - L2)
 dC = (C1 - C2)
 dH2 = get_dH2(lab1, lab2)
 SL = 1
 SC = (1 + (k1 * C1))
 SH = (1 + (k2 * C1))
 dE2 = ((dL / (kL * SL)) ** 2)
 dE2 += ((dC / (kC * SC)) ** 2)
 dE2 += (dH2 / ((kH * SH) ** 2))
 return np.sqrt(dE2)

def deltaE_ciede94 ( lab1 , lab2 , kH = 1 , kC = 1 , kL = 1 , k1 = 0.045 , k2 = 0.015 ) : ( L1 , C1 ) = np . rollaxis ( lab2lch ( lab1 ) , ( - 1 ) ) [ : 2 ] ( L2 , C2 ) = np . rollaxis ( lab2lch ( lab2 ) , ( - 1 ) ) [ : 2 ] dL = ( L1 - L2 ) dC = ( C1 - C2 ) dH2 = get_dH2 ( lab1 , lab2 ) SL = 1 SC = ( 1 + ( k1 * C1 ) ) SH = ( 1 + ( k2 * C1 ) ) dE2 = ( ( dL / ( kL * SL ) ) ** 2 ) dE2 += ( ( dC / ( kC * SC ) ) ** 2 ) dE2 += ( dH2 / ( ( kH * SH ) ** 2 ) ) return np . sqrt ( dE2 )
color difference according to ciede 94 standard accommodates perceptual non-uniformities through the use of application specific scale factors .