You can use anything that outputs colour for masks so that's no problem. You can do anything in the node graph. Even split the colours up for different masks.
This is my next test. Blending two gradients:
Below is a simple gradient hack for colours in a tgd. I can't just show you a screenshot. You wont see how it's connected. Basically, I just mixed all the colours together with another colour. It's default set to black. This doesn't provide good control of saturation in the blending zones so I just stuck a colour saturation node after the graph and set it to 2. You can play around with that setting. What I like in this hack is that you can mess around with the blending colour between each colour. Adjust the colour offset of the fractal to change how the fractal controls the colour. Basically, it's a hack that gets you gradients beyond two colours but I like the creativity in being able to get strange gradient graphs. It has limitations but the cool thing is that it's easy to add more nodes of colours. The fractal is also controlling displacement in that surface layer.
There is no excuse now for not getting more interesting rock colours
I want to add some functions now to for example, limit and repeat the gradient.