private static Paint darkerLinearGradientPaint(LinearGradientPaint paint){
  final Color[] paintColors=paint.getColors();
  for (int i=0; i < paintColors.length; i++) {
    paintColors[i]=darker(paintColors[i]);
  }
  return new LinearGradientPaint(paint.getStartPoint(),paint.getEndPoint(),paint.getFractions(),paintColors,paint.getCycleMethod(),paint.getColorSpace(),paint.getTransform());
}

private static Paint darkerLinearGradientPaint ( LinearGradientPaint paint ) { final Color [ ] paintColors = paint . getColors ( ) ; for ( int i = 0 ; i < paintColors . length ; i ++ ) { paintColors [ i ] = darker ( paintColors [ i ] ) ; } return new LinearGradientPaint ( paint . getStartPoint ( ) , paint . getEndPoint ( ) , paint . getFractions ( ) , paintColors , paint . getCycleMethod ( ) , paint . getColorSpace ( ) , paint . getTransform ( ) ) ; }
create a new gradient with its colours darkened .
