+ 4
How can a canvas be given color attribute
6 Answers
+ 14
or ctx.strokeStyle=color in case you want to change line color
+ 13
color or background color?
For background color, do this in css:
canvas{
background-color:red;
}
+ 13
ctx.fillStyle=color
+ 3
You can draw a rectangle in the color you want.
context.fillRect(0,0,canvas.width,canvas.height);
+ 2
fill=color
+ 2
please where should I insert the fill