code: 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))
          );
      }
docs: Scales the brightness of a pixel.