public static int toColorWithAlpha ( int red , int green , int blue , int alpha ) { validateRGB ( red ) ; validateRGB ( green ) ; validateRGB ( blue ) ; int color = ( red & 0xff ) << 16 | ( green & 0xff ) << 8 | ( blue & 0xff ) ; if ( alpha != - 1 ) { validateRGB ( alpha ) ; color = ( alpha & 0xff ) << 24 | color ; } return color ; }
Convert the RBGA values to a color integer