int color = Color.rgb(255, 0, 0);
int red = Color.red(color);
int semiTransparent = Color.argb(128, Color.red(color), Color.green(color), Color.blue(color));This code creates a new color object with the same red, green, and blue components as the original color, but with an alpha value of 128. The android.graphics.Color class is in the android.graphics package.