code: function XYZToCieLab ({ x, y, z, a }) {
      // Wikipedia: http://en.wikipedia.org/wiki/Lab_color_space
  
      const xn = WHITEPOINT_D65_X;
      const yn = WHITEPOINT_D65_Y;
      const zn = WHITEPOINT_D65_Z;
  
      const f = t =>
          t >= 8.85645167903563082e-3
              ? Math.pow(t, 0.333333333333333) : (841.0 / 108.0) * t + 4.0 / 29.0;
  
      return {
          l: 116 * f(y / yn) - 16,
          a: 500 * (f(x / xn) - f(y / yn)),
          b: 200 * (f(y / yn) - f(z / zn)),
          alpha: a
      };
  }
docs: Convert CIE XYZ to CIE L*a*b* (CIELAB) with the D65 white point