Hi and welcome to this forum!
Please, have a look at this post:
it is really useful…
That said.
You can’t make gradients with surfaces, but you can color mesh vertices.
In your case a single triangular mesh face will be plenty.
Remapping vertices Y coordinate to a 0-1 domain and using Gradient component to get colors to feed on the mesh creation (1 color per vertex).