static int deriveARGB(Color color1,Color color2,float midPoint){
  int r=color1.getRed() + (int)((color2.getRed() - color1.getRed()) * midPoint + 0.5f);
  int g=color1.getGreen() + (int)((color2.getGreen() - color1.getGreen()) * midPoint + 0.5f);
  int b=color1.getBlue() + (int)((color2.getBlue() - color1.getBlue()) * midPoint + 0.5f);
  int a=color1.getAlpha() + (int)((color2.getAlpha() - color1.getAlpha()) * midPoint + 0.5f);
  return ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8)| (b & 0xFF);
}

static int deriveARGB ( Color color1 , Color color2 , float midPoint ) { int r = color1 . getRed ( ) + ( int ) ( ( color2 . getRed ( ) - color1 . getRed ( ) ) * midPoint + 0.5f ) ; int g = color1 . getGreen ( ) + ( int ) ( ( color2 . getGreen ( ) - color1 . getGreen ( ) ) * midPoint + 0.5f ) ; int b = color1 . getBlue ( ) + ( int ) ( ( color2 . getBlue ( ) - color1 . getBlue ( ) ) * midPoint + 0.5f ) ; int a = color1 . getAlpha ( ) + ( int ) ( ( color2 . getAlpha ( ) - color1 . getAlpha ( ) ) * midPoint + 0.5f ) ; return ( ( a & 0xFF ) << 24 ) | ( ( r & 0xFF ) << 16 ) | ( ( g & 0xFF ) << 8 ) | ( b & 0xFF ) ; }
derives the argb value for a color based on an offset between two other colors .
