RGB graphics using Javascript

Yesterday we copied the HTML and Javascript program for painting graphics pixel by pixel.
We also saw that each pixel has a Red, Green and Blue component that goes from 0-255.

This is the version we used yesterday RGBgraphics.html. This version only has colours going up to 255.

The version on this website is different as the colours are entered as going up to 1024, but then scaled to 255. So the formulas that you get from this website won't look the same as in the images.

To fix it, find these three lines in the RGB.html program and change them to look like this:

data[i++] = red(x, y) >> 2;
data[i++] = green(x, y) >> 2;
data[i++] = blue(x, y) >> 2;

Some things that you can do

The End

Now start playing!