Create gradient along spline

Hi there! Love all your software.

I was just wondering if it’s possible to create grayscale/colour gradients along splines in 2D in IlluGen? Something like the attached example image:

Not necessarily able to layer over itself, but just a way to apply a linear gradient along the spline from it’s start to end.

I’ve been playing around and using the Spline node I can’t work out a way to do this, if it’s possible, as the output is itself just a mask. I thought it might have to be done using the Geo Sweep node instead that would have UVs, but seems more difficult to align to the camera and use in a 2D sort of way rather than exporting geo from it.

Thanks!