question: public static Color blend ( Color color1 , Color color2 , double weight ) { double w2 = MathUtils . limit ( weight , 0.0 , 1.0 ) ; double w1 = 1.0 - w2 ; int r = ( int ) Math . round ( w1 * color1 . getRed ( ) + w2 * color2 . getRed ( ) ) ; int g = ( int ) Math . round ( w1 * color1 . getGreen ( ) + w2 * color2 . getGreen ( ) ) ; int b = ( int ) Math . round ( w1 * color1 . getBlue ( ) + w2 * color2 . getBlue ( ) ) ; int a = ( int ) Math . round ( w1 * color1 . getAlpha ( ) + w2 * color2 . getAlpha ( ) ) ; return new Color ( r , g , b , a ) ; }
target:  Linearly blends two colors with a defined weight.