How do I make the color of dynamic terrain vary based on the height of the terrain

Found the playground i originally wanted to share. Much prettier than what i came up with. Uses node materials and raw textures. Here’s the link to the documentation page which has a brief video as well as the link to the playground.