public int alphaBlendWithWhite(int color){
  float alpha=Color.alpha(color) / 255f;
  int origR=Color.red(color);
  int origG=Color.green(color);
  int origB=Color.blue(color);
  int white=255;
  int r=(int)((origR * alpha) + (white * (1.0 - alpha)));
  if (r > 255)   r=255;
  int g=(int)((origG * alpha) + (white * (1.0 - alpha)));
  if (g > 255)   g=255;
  int b=(int)((origB * alpha) + (white * (1.0 - alpha)));
  if (b > 255)   b=255;
  return Color.argb(255,r,g,b);
}

public int alphaBlendWithWhite ( int color ) { float alpha = Color . alpha ( color ) / 255f ; int origR = Color . red ( color ) ; int origG = Color . green ( color ) ; int origB = Color . blue ( color ) ; int white = 255 ; int r = ( int ) ( ( origR * alpha ) + ( white * ( 1.0 - alpha ) ) ) ; if ( r > 255 ) r = 255 ; int g = ( int ) ( ( origG * alpha ) + ( white * ( 1.0 - alpha ) ) ) ; if ( g > 255 ) g = 255 ; int b = ( int ) ( ( origB * alpha ) + ( white * ( 1.0 - alpha ) ) ) ; if ( b > 255 ) b = 255 ; return Color . argb ( 255 , r , g , b ) ; }
blends given color with white background . this means that a full color < br > with transparency ( alpha ) will be lightened to make it look like it is < br > rendered over a white background . resulting color will be non - transparent .
