I have read the ColorMatrix documentation and it says the following:
5x4 matrix for transforming the color+alpha components of a Bitmap.
The matrix is stored in a single array and its treated as follows:
[ a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t ]
When applied to a color
[r, g, b, a]
, the resulting color is computed as (after clamping)
- R' = aR + bG + cB + dA + e;
- G' = fR + gG + hB + iA + j;
- B' = kR + lG + mB + nA + o;
- A' = pR + qG + rB + sA + t;
I know how to get the result but I still have some questions:
[r, g, b, a]
, is color [r, g, b, a]
calculated by system?a d c d
and so on can be negative values. What is the difference between positive values and negative values.[a b c d..t]
possibly with examples?If I'm guessing right you want some information about color matrices. I've found some sites that explain it in detail.
It's not Android or Java related but it should be usefull to get the point across.
Understanding the Use of ColorMatrix and ColorMatrixColorFilter to Modify a Drawable's Hue
Color Transformations and the Color Matrix
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With