I successfully implemented functionality to adjust the contrast and/or brightness of an ImageView via values coming from user's SeekBars selections. For the contrast it looks like that (similar for brightness):
// Contrast
ColorMatrix colorMatrix = new ColorMatrix();
colorMatrix.set(new float[] {
scale, 0, 0, 0, translate, // Red
0, scale, 0, 0, translate, // Green
0, 0, scale, 0, translate, // Blue
0, 0, 0, 1, 0 }); // Alpha
imageView.setColorFilter(new ColorMatrixColorFilter(colorMatrix);
So I could adjust the contrast and/or brightness just by scaling (multiplication) or translating (addition) the RGB values with another value.
How can I do the same thing (using a matrix) for adjusting the image's color temperature?