Reputation: 973
I'm trying to create an effect that I saw in an IOS application where the they used a blend mode of color and one of hue, but I couldn't find those blend modes in the PorterDuff.modes enum. Do you know if there are equivalent modes in android? Thanks!
Upvotes: 0
Views: 2276
Reputation: 67512
It depends exactly what you're trying to do; depending on the color used, you could use PorterDuff.Mode.MULTIPLY
or SRC_OVER
; hue is a little more complex.
If none of the modes suit your needs (because, no, there are no default color/hue PorterDuff modes), this answer may tickle your fancy. It's basically adjusting the hue of a ColorMatrix
, which can then be applied to a Drawable
. (That process is elaborated on in the preceding answer's OP.)
Upvotes: 2