public int lightenColor(int color,float factor){
  float r=Color.red(color) * factor;
  float g=Color.green(color) * factor;
  float b=Color.blue(color) * factor;
  int ir=Math.min(255,(int)r);
  int ig=Math.min(255,(int)g);
  int ib=Math.min(255,(int)b);
  int ia=Color.alpha(color);
  return (Color.argb(ia,ir,ig,ib));
}

public int lightenColor ( int color , float factor ) { float r = Color . red ( color ) * factor ; float g = Color . green ( color ) * factor ; float b = Color . blue ( color ) * factor ; int ir = Math . min ( 255 , ( int ) r ) ; int ig = Math . min ( 255 , ( int ) g ) ; int ib = Math . min ( 255 , ( int ) b ) ; int ia = Color . alpha ( color ) ; return ( Color . argb ( ia , ir , ig , ib ) ) ; }
lighten the given color by the factor
