public int addRGBColor(int color1,int color2)
{
color1 &=0xFEFEFE; //set some lsb to 0
color2 &=0xFEFEFE; //set some lsb to 0
//add color
int color=color1+color2;
//clamp color to 0 - 255
color|=(( color>>8 ) &0x010101)*0xFF;
}
public int addRGBColor(int color1,int color2)
{
color1 &=0xFEFEFE; //set some lsb to 0
color2 &=0xFEFEFE; //set some lsb to 0
//add color
int color=color1+color2;
//clamp color to 0 - 255
color|=(( color>>8 ) &0x010101)*0xFF;
}