static bool rgbAllPixelsInAreaEqualTo(RGBImage img, int x1, int y1, int x2, int y2, int color) { for (int y = y1; y < y2; y++) for (int x = x1; x < x2; x++) if (img.getInt(x, y) != color) false; true; }