This script will construct either a hexagonal or triangular grid. It's a kind-of follow-up script to the circular grid one I made a bit earlier. (If you wanted that one instead, look here: http://registry.gimp.org/node/25206)
You choose the size of the image, and the length of side of the shape. The shapes can be filled with up to six different colors, a white background, transparent, or completely random colors. There is also an option to set up the grid so that it will tile seamlessly. I've attached a picture showing a hexagonal tiling grid generated with this script.