Adding colored background to a layer is very easy, just create a CCLayer from the subclass CCLayerColor and in the constructor define the name of the color as show below.
- // Set background color to magenta.
- CCLayerColor* colorLayer =[CCLayerColor layerWithColor:ccc4(255, 0, 255, 255)];
- [self addChild:colorLayer z:0];