Stage#setBackgroundColor()

setBackgroundColor(color)

Sets the background color for the Stage.

The color can be given as a hex string ('#RRGGBB'), a CSS color string ('rgb(r,g,b)'), or a numeric value (0xRRGGBB).

An alpha channel is not supported and will be ignored.

If you've set your game to be transparent then calls to setBackgroundColor are ignored.

Parameters
Name Type Description
color number | string

The color of the background.

Source code: core/Stage.js (Line 319)
doc_phaser
2017-02-14 11:12:48
Comments
Leave a Comment

Please login to continue.