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)
Please login to continue.