{0, sXYZ[1] / tXYZ[1], 0},
{0, 0, sXYZ[2] / tXYZ[2]}
};
// total tansform
return B.times(new Matrix(diag)).times(B.inverse()).getArrayFloat();
}
public static double saturation(double r, double g, double b) {
double min = Math.min(r, Math.min(g, b));
double max = Math.max(r, Math.max(g, b));