Android Utililty Methods Color Darker

List of utility methods to do Color Darker

Description

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

Method

intgetDarker(int colour)
get Darker
float[] hsv = new float[3];
Color.colorToHSV(colour, hsv);
hsv[2] *= 0.5f; 
return Color.HSVToColor(hsv);
booleanisColorDark(final int color)
Calculate whether a color is light or dark, based on a commonly known brightness formula.
return (30 * Color.red(color) + 59 * Color.green(color) + 11 * Color
        .blue(color)) / 100 <= BRIGHTNESS_THRESHOLD;