I really like the (JS) code for the Turing Drawings art app.
// Get a reference to the canvas
canvas = document.getElementById("canvas");
// Set the canvas size
canvas.width = 512;
canvas.height = 512;
And then missing when they could be useful (or a more clear data structure should have been used, e.g. an object with colors as keys): var colorMap = [
255,0 ,0 , // Initial symbol color
0 ,0 ,0 , // Black
255,255,255, // White
0 ,255,0 , // Green
0 ,0 ,255, // Blue
255,255,0 ,
0 ,255,255,
255,0 ,255,
];