Color Gradient on Curves

Hello
I tried again to do something in GH, but I think I am having troubles with the logic.
I have several curves, which I would love to make darker, the nearer they get to Point X.
So, for instance, the segmented Curve A is at its segment the furthest away from point x white, and the closest segment to point x is black.
I tried to shatter the curve and use “distance component” to create a domain, in order to make a gradient, but I think I made a mistake. Now all the curves have the same gradient. Thank you already for your help:)

Hi @Nicola5 ,

Your parameter input should be the distance, since that is the numerical domain in which you are evaluating to produce the gradient.

So connect the distance to your gradient t input and that should do the trick!

Oh and make sure it’s not flattened in your t input since your geometry going into the custom preview component is not flattened.

Hope that helps!