Screenshot getting wrong background color

This is strange.

I have code that writes a png image to the disk using ScreenshotAppState.
When I read the png image into a BufferedImage, I am getting a different color for the background.

Here is a test class:

package jme3;

import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
import com.jme3.app.SimpleApplication;
import com.jme3.app.state.ScreenshotAppState;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.scene.Geometry;
import com.jme3.scene.Mesh;
import com.jme3.scene.shape.Box;
import com.jme3.system.AppSettings;
import com.jme3.system.JmeContext;

public class ColorTest extends SimpleApplication {
  public static final int IMAGE_SIZE = 1024;
  public static final ColorRGBA BACKGROUND_COLOR = new ColorRGBA(0.95f,0.95f,0.95f,1);  
  private ScreenshotAppState ssAppState = null;

  @Override
  public void simpleInitApp() {
    viewPort.setBackgroundColor(BACKGROUND_COLOR);
    
    ssAppState = new ScreenshotAppState("C:"+File.separator+"Tmp"+File.separator+"test");
    ssAppState.setIsNumbered(false);
    stateManager.attach(ssAppState);
  }

  @Override
  public void simpleUpdate(float tpf) {
    Mesh m = new Box(1, 1, 1);
    Geometry geom = new Geometry("Fill", m);
    Material mat = new Material(assetManager,"Common/MatDefs/Misc/Unshaded.j3md");
    mat.setColor("Color", ColorRGBA.Green);      
    geom.setMaterial(mat);
    rootNode.attachChild(geom);
    ssAppState.takeScreenshot();
    stop(true);
  }
  
  public static void main(String[] args) 
  throws Exception {
    ColorTest app = new ColorTest();
    AppSettings appSettings = new AppSettings(true);
    appSettings.setMinHeight(IMAGE_SIZE);
    appSettings.setHeight(IMAGE_SIZE);
    appSettings.setMinWidth(IMAGE_SIZE);
    appSettings.setWidth(IMAGE_SIZE);
    app.setSettings(appSettings);
    app.start(JmeContext.Type.OffscreenSurface);
    
    System.out.println("Background color is: 0x"+Integer.toHexString(BACKGROUND_COLOR.asIntARGB()));
    BufferedImage bufferedImage = ImageIO.read(new File("C:"+File.separator+"Tmp"+File.separator+"testColorTest.png"));
    System.out.println("Pixel is 0x"+Integer.toHexString(bufferedImage.getRGB(0,0)));
  }
}

The output of my program tells me:

Background color is: 0xfff2f2f2
Pixel is 0xfff9f9f9

I am not expecting that, they should be the same, right?

In case it helps, here is the image that was generated:

According to Paint3D’s color sampler, the background color is 0xf9f9f9.
The problem is not in the code which reads the file. The color is wrong in the output file.

Is gamma correction enabled? That would make the background appear darker than the literal background color actually is.

I added:

    appSettings.setGammaCorrection(false);

to my main method and it did not make a difference.