I think I've fixed the code that you had, but I don't know how well the colors themselves match up to the types. However, I've never player any DKC game, so it is possible these seemingly wacky colors are indeed correct.
Currently, water uses #602820 and #a83028, which really don't seem like water colors to me; jungle shares its color with other (which should really be the default, which should be last); forest cave and allies are also all the same color, which is strangely yellow and blue; lastly, your default (which is for some reason separate from other) is a blue which makes it difficult to read the links.
All of this is specifically to do with which colors are used - other than that, your template should switch colors fine.