polkapunk Posted February 9, 2014 Share Posted February 9, 2014 I'm having trouble getting the background color to work in canvas mode. The background displays correctly as white if I do this:var game = new Phaser.Game(640, 480, Phaser.AUTO, '', {create: create});function create() { game.stage.backgroundColor = 0xffffff;}But if I change Phaser.AUTO to Phaser.CANVAS, the background color is the default black. I'm using the latest version of Phaser (1.1.4). It's happening to me in both Firefox and Chrome. Does anyone know if this is a bug? Or am I doing something wrong? Any help would be appreciated. Thanks! Link to comment Share on other sites More sharing options...
rich Posted February 9, 2014 Share Posted February 9, 2014 How about if you do: game.stage.backgroundColor = '#ffffff' ? Alex Ciocea and DevJ 2 Link to comment Share on other sites More sharing options...
polkapunk Posted February 9, 2014 Author Share Posted February 9, 2014 Thanks Rich! That did the trick! I'm guessing the value's just passed through and hex doesn't work with the canvas tag, or something like that. Alex Ciocea 1 Link to comment Share on other sites More sharing options...
rich Posted February 9, 2014 Share Posted February 9, 2014 No I think it's a bug actually. I just tried it using both variants on the 1.2 branch and they both now work, so I'll mark it off as fixed for now Alex Ciocea 1 Link to comment Share on other sites More sharing options...
Recommended Posts