ekatz
ekatz

Reputation: 973

ANDROID: what is the equivalent blend modes (porter duff) for Color and Hue

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

Answers (1)

Cat
Cat

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

Related Questions