var canvas = document.body.appendChild(document.createElement('canvas'));
canvas.width = 480;
canvas.height = 480;
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'black';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.translate(canvas.width/2, canvas.height/2);
ctx.globalCompositeOperation = 'lighter';
var colors = ['#f00', '#0f0', '#00f'];
for( var i = 0; i < 3; i ++) {
var rad = Math.PI*2/3*i;
ctx.fillStyle = colors[i];
var x = Math.sin(rad)*80;
var y = -Math.cos(rad)*80;
ctx.beginPath();
ctx.arc(x,y,120,0,Math.PI*2,true);
ctx.fill();
}