How to blend this properly?

Hi,

So i’m trying to make a square where the bottom of the it is all green, then towards the top of the square it fades out. This is what i have so far, but how do I get the top of the square to be the same colour as whatever the top of the side will be? And where i’ve beveled it on the edge it’s all the same green, how will that fade out like the rest of it?