public static Color darker (Color color, double fraction)
	{
		int red   = (int) Math.round (color.getRed()   * (1.0 - fraction));
		int green = (int) Math.round (color.getGreen() * (1.0 - fraction));
		int blue  = (int) Math.round (color.getBlue()  * (1.0 - fraction));

		if (red   < 0) red   = 0; else if (red   > 255) red   = 255;
		if (green < 0) green = 0; else if (green > 255) green = 255;
		if (blue  < 0) blue  = 0; else if (blue  > 255) blue  = 255;

		int alpha = color.getAlpha();

		return new Color (red, green, blue, alpha);
	}
public static Color darker ( Color color , double fraction ) { int red = ( int ) Math . round ( color . getRed ( ) * ( 1.0 - fraction ) ) ; int green = ( int ) Math . round ( color . getGreen ( ) * ( 1.0 - fraction ) ) ; int blue = ( int ) Math . round ( color . getBlue ( ) * ( 1.0 - fraction ) ) ; if ( red < 0 ) red = 0 ; else if ( red > 255 ) red = 255 ; if ( green < 0 ) green = 0 ; else if ( green > 255 ) green = 255 ; if ( blue < 0 ) blue = 0 ; else if ( blue > 255 ) blue = 255 ; int alpha = color . getAlpha ( ) ; return new Color ( red , green , blue , alpha ) ; }
Make a color darker. (RGB color scheme)

@param color     Color to make darker.
@param fraction  Darkness fraction.
@return          Darker color.