JavaScript
var canv=document.createElement('canvas');
var w=640,h=480;
var ctx= canv.getContext("2d");
canv.width = w;
canv.height = h;
canv.style.position="absolute";
canv.style.top="0px";
canv.style.left="0px";
canv.style.zIndex="1";
var ctx = canv.getContext('2d');
document.body.appendChild(canv);
var canvas1=loopableSoftNoise(canv,["0,0,0","255,5,95","0,0,0","128,0,255","255,0,128","0,0,128","64,0,127"]);
ctx.clearRect(0,0,canv.width,canv.height);
var canvas2=loopableSoftNoise(canv,["255,0,0","0,0,0","255,5,95","128,0,255","255,0,128","0,0,128","64,0,127"]);
ctx.clearRect(0,0,canv.width,canv.height);
var canvas3=loopableSoftNoise(canv,["0,0,255","50,0,0","255,5,95","128,0,255","255,0,128","0,0,128","64,0,127"]);
ctx.clearRect(0,0,canv.width,canv.height);
var canvas4=loopableSoftNoise(canv,["0,64,0","50,0,0","255,5,95","128,0,255","255,0,128","0,0,128","64,0,127"]);
//ctx.clearRect(0,0,canv.width,canv.height);
sprinkleStars(canvas3,0.3,150);
sprinkleStars(canvas2,0.4,100);
sprinkleStars(canvas3,0.6,50);
sprinkleStars(canvas4,0.8,25);
// now draw a parallax!
var parallax=[{x:0,y:0,dx:1,dy:0.1,c:canvas1},{x:0,y:0.1,dx:2,dy:0.2,c:canvas2},{x:0,y:0,dx:3,dy:0.3,c:canvas3},{x:0,y:0,dx:4,dy:0.4,c:canvas4}];
setInterval(redrawParallax,40);
function sprinkleStars(cnv,alpha,nr)
{
var i,x,y,r,pi2=2*Math.PI,ctx;
ctx = cnv.getContext("2d");
if(1)
{
// ctx.fillRect(20,20,w-40,h-40);
for(i=0;i<nr;i++)
{
x=Math.floor(Math.random()*w);
y=Math.floor(Math.random()*h);
r=alpha+Math.random()/10-Math.random()/10;
ctx.fillStyle = "rgba(255,255,255,"+alpha+")";
ctx.fillRect( x, y, 1, 1 );
}
}
}
function redrawParallax()
{
var i;
ctx.clearRect(0,0,canv.width,canv.height);
for(i=0;i<parallax.length;i++)
{
parallax[i].x+=parallax[i].dx;
parallax[i].y+=parallax[i].dy;
if(parallax[i].x>canv.width)
{
...