Android Utililty Methods Color Sum

List of utility methods to do Color Sum

Description

The list of methods to do Color Sum are organized into topic(s).

Method

intColorSum(int color, int color2)
Returns the sum of the two provided colors.
return ColorSum(color, color2, false);
intColorSum(int color, int color2, boolean subtract)
Returns the sum of one color and another.
final int a = (color >>> 24);
final int r = (color >> 16) & 0xFF;
final int g = (color >> 8) & 0xFF;
final int b = (color) & 0xFF;
final int a2 = (subtract) ? -(color2 >>> 24) : (color2 >>> 24);
final int r2 = (subtract) ? -((color2 >> 16) & 0xFF)
        : ((color2 >> 16) & 0xFF);
final int g2 = (subtract) ? -((color2 >> 8) & 0xFF)
...