Foliage color change on terain

I played Rust recently and noticed that the grass and some bushes change color depending on the terrains material. So for example if the terrains texture is a lush green then the grass will be as well but if theirs bits of a more dead orange colored texture then the grass blends in to look like its just a patch of dead grass in the middle of all the green. Is this possible in UE and if so how would i go about doing this?