Skip to main content
craigb61515015
Participant
January 15, 2020
Question

Canvas colour: Action code on a html5 canvas

  • January 15, 2020
  • 1 reply
  • 242 views

Hi there. I am working on a simple page by page story book in AA. It is a html canvas. 

 

On each page, i can change the page colour (outside of canvas) with this code. 

 

document.body.style

.backgroundColor = "your color";

 

Prob a super simple question but what is the action code for just changing the white canvas colour to something else? (without the need to draw a rectangle to fill the canvas). ? Thanks. Craig.

 

This topic has been closed for replies.

1 reply

Participant
January 15, 2020

document.getElementById("canvas").style.backgroundColor = '#000000'