Color Overlay for Android - PorterDuff Modes

I have a black and white ninefold renderer as the background for the presentation, and I would like to overlay a color on it, such as a translucent overlay, which leaves the visible drawing, but applies the desired color to it.

I thought drawable.setColorFilter(color,mode) could do the trick, but I can't figure out what the different modes mean.

Can someone give me a hint?

+7
source share
1 answer

I believe this question may help you:

Understanding the use of ColorMatrix and ColorMatrixColorFilter to change the hue of a drawing

However, I would suggest using PorterDuff.Mode.MULTIPLY for what you need.

+8
source

All Articles