Set BufferedImage to be a color in Java
Probably something like:
BufferedImage image = new BufferedImage(...);
Graphics2D g2d = image.createGraphics();
g2d.setColor(...);
g2d.fillRect(...);
Get the graphics object for the image, set the current paint to the desired colour, then call fillRect(0,0,width,height)
.
BufferedImage b_img = ...
Graphics2D graphics = b_img.createGraphics();
graphics.setPaint ( new Color ( r, g, b ) );
graphics.fillRect ( 0, 0, b_img.getWidth(), b_img.getHeight() );