Hjulle
0
Q:

canvas line color

var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.strokeStyle = "#FF0000";
ctx.strokeRect(20, 20, 150, 100);
3
const context = canvas.getContext('2d');

context.strokeStyle = 'blue';
context.strokeRect(100, 100, 50, 50);
1

New to Communities?

Join the community