Android Utililty Methods Color Blend

List of utility methods to do Color Blend

Description

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

Method

ColorMatrixColorFiltercreateColorFilterByColor( int color, float alpha)
create Color Filter By Color
final int r = (color >> 16) & 255;
final int g = (color >> 8) & 255;
final int b = color & 255;
final float[] array = new float[] { 0, 0, 0, 0, r, 0, 0, 0, 0, g,
        0, 0, 0, 0, b, 0, 0, 0, alpha, 0 };
return new ColorMatrixColorFilter(array);
ColorMatrixColorFiltercreateDarkerColorFilter( float darkRatio)
create Darker Color Filter
final float[] array = new float[] { darkRatio, 0, 0, 0, 0, 0,
        darkRatio, 0, 0, 0, 0, 0, darkRatio, 0, 0, 0, 0, 0, 1, 0 };
return new ColorMatrixColorFilter(array);
ColorMatrixColorFiltercreateNightColorFilter()
create Night Color Filter
return createDarkerColorFilter(DEFUALT_NIGHT_DARK_RATIO);
intgetAlpha(int color)
get Alpha
return ((0xff000000 & color) >> 24);