Define a color to set the fill style

ctx.fillStyle = "rgba(, , , )";

ctx.beginPath();

ctx.moveTo(, );

ctx.lineTo(, );

ctx.lineTo(, );

ctx.lineTo(, );

ctx.fill();

Show the path

Change the fillStyle value to see how this affects how the path is drawn on the <canvas>.

Define a color to set the stroke style

ctx.lineWidth = ;

ctx.strokeStyle = "rgba(, , , )";

ctx.beginPath();

ctx.moveTo(, );

ctx.lineTo(, );

ctx.lineTo(, );

ctx.lineTo(, );

ctx.stroke();

Show the path

Change the strokeStyle value to see how this affects how the path is drawn on the <canvas>.