How to apply mix colors in curves? I want to apply colors on the spherical curve (shown below):



But I want it to be colored as below:


I am so tired of finding the solutions on you tube but did not find the way to do it.
Using Cycles, you can obtain this on a curve:



The material node setup is the following:


1- From texture coordinate input node use UV

2- Separate the UV coordinates

3- Keep the 'U' (= X) coordinate and set it as input in a color ramp (add the wanted colors to it)

4/5- Set the result in your shader

Finally, go to the curve properties and set the texture space to use 'UV for mapping'. 'U' (=X) is along the curve and 'V' (=Y) is transversal to the curve.