Solve It
In this example, we set all the pixels in an image to the color black. This means that every pixel needs its red, green, and blue values all set to 0.
Code It
// set all to black
var image = new SimpleImage("duke_blue_devil.png");
for (var pixel of image.values()) {
pixel.setRed(0);
pixel.setBlue(0);
pixel.setGreen(0);
}
print(image);
See It
Available Images

duke_blue_devil.png
[397x337]
Drop your images onto the area above to make it available within your code editor on this page. Note: your images will not be uploaded anywhere, they will stay on your computer.
