Computing the combined color of two colors (Over operator)

后端 未结 3 583
南旧
南旧 2021-01-15 08:28

This is for an Android application. Let\'s say that I have two colors with alpha

int color1 = 0x12345678  // aarrggbb
int color2 = 0x87654321
3条回答
  •  南方客
    南方客 (楼主)
    2021-01-15 08:53

    I think what you want might be PorterDuff.Mode.Multiply

    ... used with PorterDuffColorFilter.

    EDIT: Actually maybe you want mode DST_OVER for destination color "over" source color.

提交回复
热议问题