Phaser API Documentation

  Version: 
setBackgroundColor([color])

Description:

Sets the background color for this Camera.

By default a Camera has a transparent background but it can be given a solid color, with any level of transparency, via this method.

The color value can be specified using CSS color notation, hex or numbers.

Parameters:

name type arguments Default description
color string | number | Phaser.Types.Display.InputColorObject <optional> 'rgba(0,0,0,0)'

The color value. In CSS, hex or numeric color notation.

Returns:
Description:

This Camera instance.

Since: 3.0.0