<canvas id="canvas" width="1024" height="600"></canvas>
<script type="text/JavaScript">
var ctx = document.getElementById('canvas').getContext('2d');
// red color
ctx.fillStyle = 'rgb(' + 255 + ',' + 0 + ',' + 0 + ')';
ctx.fillRect(10, 10, 90, 120);
</script>