The program colors the heightmap based on the gradient image. For every pixel of the heightmap, the program determines the color at the coordinate (x,y) based on the color at the gradient coordinate (floor((r+g+b)/3),0) where r, g, and b are the color channels of the heightmap image at (x,y).

Any of the parameters can be left out and the default values will be used. For example

I am the sword in the darkness. I am the watcher on the walls. I am the fire that burns against the cold, the light that brings the dawn, the horn that wakes the sleepers, the shield that guards the realms of men.