If you are using the anchor center branch of andengine then you can just import the Gradient Class from org.andengine.entity.primitive.Gradient and set it's height and width to the camera width and height as shown:
final int CameraHeight = 480;
final int CameraWidth = 480;
int directionX = 1;
int directionY = 1;
Gradient g = new Gradient(0,0,CameraWidth,CameraHeight,
this.getVertexBufferObjectManager());
g.setGradient(yourFirstColor,yourSecondColor,directionX,directionY);
And then all you must do is attach it to your scene as the first child scene.attachChild(g);
Then to make it change over time you can register an update handler with the scene that changes the colors or changes the direction like:
scene.registerUpdateHandler(new IUpdateHandler(){
@Override
onUpdate(float pSeconds){
//Change the color or the direction of the gradient
}
});
or you could register an entity modifier like ColorModifier
ColorModifier cm = new ColorModifier(5, Color.BLUE, Color.GREEN);
g.registerEntityModifier(cm);