private static BufferedImage createComparisonImage(BufferedImage img1, BufferedImage img2) {
        BufferedImage comparisonImage = new BufferedImage(img1.getWidth(), img1.getHeight(), BufferedImage.TYPE_INT_ARGB);

        for (int y = 0; y < img1.getHeight(); y++) {
            for (int x = 0; x < img1.getWidth(); x++) {
                PixelSamenessDegree pixelSameness = categorisePixelDifference(img1.getRGB(x, y),img2.getRGB(x, y));

                if(pixelSameness == PixelSamenessDegree.SAME){
                    int washedOutPixel = getWashedOutPixel(img1, x, y, 0.9f);
                    //Color rawColor = new Color(img1.getRGB(x, y), true);
                    comparisonImage.setRGB(x, y, washedOutPixel);
                }else{
                    comparisonImage.setRGB(x, y, pixelSameness.getColorInDebugImage().asIntARGB());
                }
            }
        }
        return comparisonImage;
    }
Creates an image that highlights the differences between the two images. The reference image is shown
dully in grey with blue, yellow, orange and red showing where pixels are different.
jme3-screenshot-tests/src/main/java/org/jmonkeyengine/screenshottests/testframework/TestDriver.java