<canvas width="600" height="600">
</canvas>
<script>
var pantalla = document.querySelector("canvas");
var pincel = pantalla.getContext("2d");
pincel.fillStyle = "green" //propiedad
pincel.fillRect(0,0,350,300); //function
pincel.fillStyle = "black"
pincel.fillRect(50,50,90,90);
pincel.fillStyle = "black"
pincel.fillRect(210,50,90,90);
pincel.fillStyle = "black"
pincel.fillRect(140,140,70,100);
pincel.fillStyle = "black"
pincel.fillRect(100,200,40,100);
pincel.fillStyle = "black"
pincel.fillRect(210,200,40,100);
pincel.fillStyle = "green"
pincel.fillRect(75,300,200,250);
pincel.fillStyle = "#003300"
pincel.fillRect(75,300,200,2);
pincel.fillStyle = "green"
pincel.fillRect(55,500,240,90);
pincel.fillStyle = "#003300"
pincel.fillRect(55,570,240,30);
pincel.fillStyle = "#003300"
pincel.fillRect(55,500,240,2);
pincel.fillStyle = "black"
pincel.fillRect(180,500,2,100);
</script>