public String convertToARGB(int color) {
// alpha = Integer.toHexString(Color.alpha(color));
red = Integer.toString(Color.red(color));
green = Integer.toString(Color.green(color));
blue = Integer.toString(Color.blue(color));
// System.out.println(Color.red(color));
ColorR.setText(red);
ColorG.setText(green);
ColorB.setText(blue);
return "#" + red + green + blue;
}
public static int alpha(int color) {
return color >>> 24;}
/**
* Return the red component of a color int. This is the same as saying
* (color >> 16) & 0xFF
*/
public static int red(int color) {
return (color >> 16) & 0xFF;
}
<