deltaE76 function

double deltaE76(
  1. LabColor lab1,
  2. LabColor lab2
)

The 1976 formula is the first formula that related a measured color difference to a known set of CIELAB coordinates. This formula has been succeeded by the 1994 and 2000 formulas because the CIELAB space turned out to be not as perceptually uniform as intended, especially in the saturated regions. This means that this formula rates these colors too highly as opposed to other colors.

Source: http://en.wikipedia.org/wiki/Color_difference#CIE76

Implementation

double deltaE76(LabColor lab1, LabColor lab2) {
  return sqrt(pow(lab2.l - lab1.l, 2) +
      pow(lab2.a - lab1.a, 2) +
      pow(lab2.b - lab1.b, 2));
}