def deltaE_cie76(lab1, lab2):
 lab1 = np.asarray(lab1)
 lab2 = np.asarray(lab2)
 (L1, a1, b1) = np.rollaxis(lab1, (-1))[:3]
 (L2, a2, b2) = np.rollaxis(lab2, (-1))[:3]
 return np.sqrt(((((L2 - L1) ** 2) + ((a2 - a1) ** 2)) + ((b2 - b1) ** 2)))

def deltaE_cie76 ( lab1 , lab2 ) : lab1 = np . asarray ( lab1 ) lab2 = np . asarray ( lab2 ) ( L1 , a1 , b1 ) = np . rollaxis ( lab1 , ( - 1 ) ) [ : 3 ] ( L2 , a2 , b2 ) = np . rollaxis ( lab2 , ( - 1 ) ) [ : 3 ] return np . sqrt ( ( ( ( ( L2 - L1 ) ** 2 ) + ( ( a2 - a1 ) ** 2 ) ) + ( ( b2 - b1 ) ** 2 ) ) )
euclidean distance between two points in lab color space parameters lab1 : array_like reference color lab2 : array_like comparison color returns de : array_like distance between colors lab1 and lab2 references .