# HG changeset patch # User mgeorgi # Date 1340374379 -3600 # Node ID c84bcf573b31bd249824ad190f697d0a3b0a0173 # Parent 49cfd3ad1fe7977774dfe5a5b80a76dc78518cee color list diff -r 49cfd3ad1fe7 -r c84bcf573b31 nodejs-server/app.js --- a/nodejs-server/app.js Fri Jun 22 15:01:16 2012 +0100 +++ b/nodejs-server/app.js Fri Jun 22 15:12:59 2012 +0100 @@ -44,16 +44,21 @@ var ctx = this.canvas.getContext("2d"); ctx.clearRect(0, 0, 320, 320); + var list = []; + for (var y = 0; y < 320; y += step) { var left = this.interpolateColor(this.tl, this.bl, y / 320); var right = this.interpolateColor(this.tr, this.br, y / 320); for (var x = 0; x < 320; x += step) { var color = this.interpolateColor(left, right, x / 320); + list.push([x / 320, 1 - y / 320, color.r, color.g, color.b].join(',')); ctx.fillStyle = "rgb(" + color.r + "," + color.g + "," + color.b + ")"; ctx.fillRect(x, y, step, step); } } + console.log(list.join("\n")); + ctx.beginPath(); ctx.strokeStyle = "rgb(0,0,0)"; ctx.moveTo(0, 160); diff -r 49cfd3ad1fe7 -r c84bcf573b31 nodejs-server/colors.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nodejs-server/colors.txt Fri Jun 22 15:12:59 2012 +0100 @@ -0,0 +1,257 @@ +x,y,r,g,b +0,1,200,0,0 +0.0625,1,200,9,0 +0.125,1,200,18,0 +0.1875,1,200,28,0 +0.25,1,200,37,0 +0.3125,1,200,46,0 +0.375,1,200,56,0 +0.4375,1,200,65,0 +0.5,1,200,75,0 +0.5625,1,200,84,0 +0.625,1,200,93,0 +0.6875,1,200,103,0 +0.75,1,200,112,0 +0.8125,1,200,121,0 +0.875,1,200,131,0 +0.9375,1,200,140,0 +0,0.9375,187,3,6 +0.0625,0.9375,187,12,5 +0.125,0.9375,188,22,5 +0.1875,0.9375,189,31,5 +0.25,0.9375,190,41,5 +0.3125,0.9375,191,50,5 +0.375,0.9375,191,60,5 +0.4375,0.9375,192,69,5 +0.5,0.9375,193,79,5 +0.5625,0.9375,194,88,5 +0.625,0.9375,195,98,5 +0.6875,0.9375,195,107,5 +0.75,0.9375,196,117,5 +0.8125,0.9375,197,126,5 +0.875,0.9375,198,136,5 +0.9375,0.9375,199,145,5 +0,0.875,175,6,12 +0.0625,0.875,176,15,11 +0.125,0.875,178,25,11 +0.1875,0.875,179,34,11 +0.25,0.875,181,44,11 +0.3125,0.875,182,54,11 +0.375,0.875,184,63,11 +0.4375,0.875,185,73,11 +0.5,0.875,187,83,11 +0.5625,0.875,189,92,10 +0.625,0.875,190,102,10 +0.6875,0.875,192,111,10 +0.75,0.875,193,121,10 +0.8125,0.875,195,131,10 +0.875,0.875,196,140,10 +0.9375,0.875,198,150,10 +0,0.8125,162,9,18 +0.0625,0.8125,164,18,17 +0.125,0.8125,166,28,17 +0.1875,0.8125,169,38,17 +0.25,0.8125,171,48,17 +0.3125,0.8125,173,57,17 +0.375,0.8125,176,67,16 +0.4375,0.8125,178,77,16 +0.5,0.8125,181,87,16 +0.5625,0.8125,183,96,16 +0.625,0.8125,185,106,16 +0.6875,0.8125,188,116,15 +0.75,0.8125,190,126,15 +0.8125,0.8125,192,135,15 +0.875,0.8125,195,145,15 +0.9375,0.8125,197,155,15 +0,0.75,150,12,25 +0.0625,0.75,153,21,24 +0.125,0.75,156,31,24 +0.1875,0.75,159,41,24 +0.25,0.75,162,51,23 +0.3125,0.75,165,61,23 +0.375,0.75,168,71,23 +0.4375,0.75,171,81,22 +0.5,0.75,175,91,22 +0.5625,0.75,178,100,22 +0.625,0.75,181,110,21 +0.6875,0.75,184,120,21 +0.75,0.75,187,130,21 +0.8125,0.75,190,140,20 +0.875,0.75,193,150,20 +0.9375,0.75,196,160,20 +0,0.6875,137,15,31 +0.0625,0.6875,140,25,30 +0.125,0.6875,144,35,30 +0.1875,0.6875,148,45,29 +0.25,0.6875,152,55,29 +0.3125,0.6875,156,65,29 +0.375,0.6875,160,75,28 +0.4375,0.6875,164,85,28 +0.5,0.6875,168,95,28 +0.5625,0.6875,172,105,27 +0.625,0.6875,176,115,27 +0.6875,0.6875,180,125,26 +0.75,0.6875,184,135,26 +0.8125,0.6875,188,145,26 +0.875,0.6875,192,155,25 +0.9375,0.6875,196,165,25 +0,0.625,125,18,37 +0.0625,0.625,129,28,36 +0.125,0.625,134,38,36 +0.1875,0.625,139,48,35 +0.25,0.625,143,58,35 +0.3125,0.625,148,68,34 +0.375,0.625,153,78,34 +0.4375,0.625,157,88,33 +0.5,0.625,162,99,33 +0.5625,0.625,167,109,33 +0.625,0.625,171,119,32 +0.6875,0.625,176,129,32 +0.75,0.625,181,139,31 +0.8125,0.625,185,149,31 +0.875,0.625,190,159,30 +0.9375,0.625,195,169,30 +0,0.5625,112,21,43 +0.0625,0.5625,117,31,42 +0.125,0.5625,123,41,42 +0.1875,0.5625,128,51,41 +0.25,0.5625,134,62,41 +0.3125,0.5625,139,72,40 +0.375,0.5625,145,82,40 +0.4375,0.5625,150,92,39 +0.5,0.5625,156,103,39 +0.5625,0.5625,161,113,38 +0.625,0.5625,167,123,38 +0.6875,0.5625,172,133,37 +0.75,0.5625,178,144,37 +0.8125,0.5625,183,154,36 +0.875,0.5625,189,164,36 +0.9375,0.5625,194,174,35 +0,0.5,100,25,50 +0.0625,0.5,106,35,49 +0.125,0.5,112,45,48 +0.1875,0.5,118,55,48 +0.25,0.5,125,66,47 +0.3125,0.5,131,76,46 +0.375,0.5,137,86,46 +0.4375,0.5,143,97,45 +0.5,0.5,150,107,45 +0.5625,0.5,156,117,44 +0.625,0.5,162,128,43 +0.6875,0.5,168,138,43 +0.75,0.5,175,148,42 +0.8125,0.5,181,159,41 +0.875,0.5,187,169,41 +0.9375,0.5,193,179,40 +0,0.4375,87,28,56 +0.0625,0.4375,94,38,55 +0.125,0.4375,101,48,54 +0.1875,0.4375,108,59,53 +0.25,0.4375,115,69,53 +0.3125,0.4375,122,80,52 +0.375,0.4375,129,90,51 +0.4375,0.4375,136,101,51 +0.5,0.4375,143,111,50 +0.5625,0.4375,150,121,49 +0.625,0.4375,157,132,49 +0.6875,0.4375,164,142,48 +0.75,0.4375,171,153,47 +0.8125,0.4375,178,163,47 +0.875,0.4375,185,174,46 +0.9375,0.4375,192,184,45 +0,0.375,75,31,62 +0.0625,0.375,82,41,61 +0.125,0.375,90,52,60 +0.1875,0.375,98,62,59 +0.25,0.375,106,73,59 +0.3125,0.375,114,83,58 +0.375,0.375,121,94,57 +0.4375,0.375,129,104,56 +0.5,0.375,137,115,56 +0.5625,0.375,145,126,55 +0.625,0.375,153,136,54 +0.6875,0.375,160,147,53 +0.75,0.375,168,157,53 +0.8125,0.375,176,168,52 +0.875,0.375,184,178,51 +0.9375,0.375,192,189,50 +0,0.3125,62,34,68 +0.0625,0.3125,70,44,67 +0.125,0.3125,79,55,66 +0.1875,0.3125,87,66,65 +0.25,0.3125,96,76,64 +0.3125,0.3125,105,87,63 +0.375,0.3125,113,98,63 +0.4375,0.3125,122,108,62 +0.5,0.3125,131,119,61 +0.5625,0.3125,139,130,60 +0.625,0.3125,148,140,59 +0.6875,0.3125,156,151,59 +0.75,0.3125,165,162,58 +0.8125,0.3125,174,172,57 +0.875,0.3125,182,183,56 +0.9375,0.3125,191,194,55 +0,0.25,50,37,75 +0.0625,0.25,59,47,74 +0.125,0.25,68,58,73 +0.1875,0.25,78,69,72 +0.25,0.25,87,80,71 +0.3125,0.25,96,91,70 +0.375,0.25,106,101,69 +0.4375,0.25,115,112,68 +0.5,0.25,125,123,67 +0.5625,0.25,134,134,66 +0.625,0.25,143,145,65 +0.6875,0.25,153,155,64 +0.75,0.25,162,166,63 +0.8125,0.25,171,177,62 +0.875,0.25,181,188,61 +0.9375,0.25,190,199,60 +0,0.1875,37,40,81 +0.0625,0.1875,47,50,80 +0.125,0.1875,57,61,79 +0.1875,0.1875,67,72,78 +0.25,0.1875,77,83,77 +0.3125,0.1875,87,94,76 +0.375,0.1875,98,105,75 +0.4375,0.1875,108,116,74 +0.5,0.1875,118,127,73 +0.5625,0.1875,128,138,72 +0.625,0.1875,138,149,71 +0.6875,0.1875,149,160,70 +0.75,0.1875,159,171,69 +0.8125,0.1875,169,182,68 +0.875,0.1875,179,193,67 +0.9375,0.1875,189,204,66 +0,0.125,25,43,87 +0.0625,0.125,35,54,85 +0.125,0.125,46,65,84 +0.1875,0.125,57,76,83 +0.25,0.125,68,87,82 +0.3125,0.125,79,98,81 +0.375,0.125,90,109,80 +0.4375,0.125,101,120,79 +0.5,0.125,112,131,78 +0.5625,0.125,123,142,77 +0.625,0.125,134,153,76 +0.6875,0.125,145,164,75 +0.75,0.125,156,175,74 +0.8125,0.125,167,186,73 +0.875,0.125,178,197,72 +0.9375,0.125,189,208,71 +0,0.0625,12,46,93 +0.0625,0.0625,23,57,91 +0.125,0.0625,35,68,90 +0.1875,0.0625,47,79,89 +0.25,0.0625,59,90,88 +0.3125,0.0625,70,101,87 +0.375,0.0625,82,113,86 +0.4375,0.0625,94,124,85 +0.5,0.0625,106,135,84 +0.5625,0.0625,117,146,82 +0.625,0.0625,129,157,81 +0.6875,0.0625,141,169,80 +0.75,0.0625,153,180,79 +0.8125,0.0625,164,191,78 +0.875,0.0625,176,202,77 +0.9375,0.0625,188,213,76 diff -r 49cfd3ad1fe7 -r c84bcf573b31 nodejs-server/server.js --- a/nodejs-server/server.js Fri Jun 22 15:01:16 2012 +0100 +++ b/nodejs-server/server.js Fri Jun 22 15:12:59 2012 +0100 @@ -25,4 +25,4 @@ res.end(fs.readFileSync("index.html")); res.writeHead(404, {'Content-Type': 'text/plain'}); } -}).listen(3000, "0.0.0.0"); +}).listen(80, "0.0.0.0");