By randomly placing elements and then repeating then 6 times you can create perfectly tiling patterns. This was my very first processing sketch ever so it's not very efficient. Click on the image to save it, move the mouse around to change colors.
// Processing JS: // http://processingjs.org/