Quilted

to generate a new and unique variation

Source Code

Every variart piece is open source, you can see exactly how it is drawn from the code.

// canvas divided up into equal squares, each square is two
// triangles

var colors = ["#fff", "#E86268", "#E2D16A", "#84EAE6", "#E9E3BE", "#32AEBF"];
var squareSize = 100;

for (var x = 0; x < 500; x += squareSize){
  for (var y = 0; y < 500; y += squareSize){
    var offset = getRandomInt(0, colors.length - 1);

    if(getRandomInt(0, 1) == 0){
      s.polygon([x, y, x, y + squareSize, x + squareSize, y])
        .attr({
        fill: colors[offset]
      })
    
      s.polygon([x + squareSize, y + squareSize, x + squareSize, y, x, y + squareSize])
        .attr({
        fill: colors[(offset + 1) % colors.length]
      })
    } else {
      s.polygon([x, y, x, y + squareSize, x + squareSize, y + squareSize])
        .attr({
        fill:  colors[offset]
      })

      s.polygon([x, y, x + squareSize, y, x + squareSize, y + squareSize])
        .attr({
        fill: colors[(offset + 1) % colors.length]
      })
    }    
  }
}