public static boolean uniform ( Color color , Pixel [ ] pixels ) { return Arrays . stream ( pixels ) . allMatch ( p -> p . toInt ( ) == color . toRGB ( ) . toInt ( ) ) ; }
Returns true if all pixels in the array have the same color