public static int scale(Double factor, int pixel) {
        return rgb(
                (int) Math.round(factor * red(pixel)),
                (int) Math.round(factor * green(pixel)),
                (int) Math.round(factor * blue(pixel))
        );
    }
public static int scale ( Double factor , int pixel ) { return rgb ( ( int ) Math . round ( factor * red ( pixel ) ) , ( int ) Math . round ( factor * green ( pixel ) ) , ( int ) Math . round ( factor * blue ( pixel ) ) ) ; }
Scales the brightness of a pixel.