<canvas width="650" height="400"></canvas>
<script type="text/javascript">
var tela = document.querySelector("canvas");
var pincel = tela.getContext("2d");
pincel.fillStyle = "green";
pincel.fillRect(0, 0, 650, 400);
pincel.fillStyle = "white";
pincel.beginPath();
pincel.moveTo(650, 200);
pincel.lineTo(0, 0);
pincel.lineTo(0, 400);
pincel.fill();
pincel.fillStyle = "yellow";
pincel.beginPath();
pincel.moveTo(600, 200);
pincel.lineTo(0, 20);
pincel.lineTo(0, 380);
pincel.fill();
pincel.fillStyle = "black";
pincel.beginPath();
pincel.moveTo(325, 200);
pincel.lineTo(0, 0);
pincel.lineTo(0, 400);
pincel.fill();
pincel.fillStyle = "red";
pincel.beginPath();
pincel.moveTo(275, 200);
pincel.lineTo(0, 30);
pincel.lineTo(0, 370);
pincel.fill();
</script>