Getting ground color for grass

I’ve done this both in UDK and UE4 so it’s certainly doable.
I did it by having a color map that shows the variation in color throughout the landscape, I removed all unwanted colors like rocks, sand and such and only had variations of green and brown then I let that color my foliage.
I’m not at home right now and it was a while ago so I don’t remember exactly but i found that Ülrich Thümmler did something similar here:

I can check when I get home exactly how I did it but that should get you going.