The color white has red, green, and blue values all set to 255, and the color black has red, green, and blue values all set to 0. In general, when all three color values are equal, the result is some shade of gray. We will set all color components of each pixel to the average of the original three color component values.
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.