There are plenty of tutorials, but I'll try to explain in short-
You basically want to use 3 colors, pure red, pure blue, and pure green. Each of these will represent a different texture in the map.
You want to create a new image, the same size as your height map and make it RGB color (not greyscale). What I suggest doing is opening your terrain mask at half transparency or so on top of he base layer just or reference. And then, much like you did the height map, you basically color xD You can scroll down in my own tutorial and it'll show you all of this ^.^
http://feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=17452.0