Working with Color Gradients

In order to work with ProPhotoGradients you will need to script.
To keep it simple we have prepared a small demonstration:
It bases on the attached script. 
You can try out, how it works with the attached project.
The workflow cannot work with scripts that use ProPhotoGradient objects. But it can handle the class object.
We did not perform any checks in this script. In a productive environment you should better do so.
So there will be some additional work necessary.
When you want to modify a ProPhotoGradient, you can call the Setter in order to get the corresponding array of colors and array of stop positions. Now change the values. It is important that the length of both arrays is the same.
With the Getter you can create a ProPhotoGradient object again.

The V5.0 project is smaller.
The V5.1 project gives now full access to a ProPhotoGradient.
The V5.2SR1 project supports alpha channel with a fader.

Short explanation of the ActionPad (the sources are slightly commented):
With Empty you can empty the ProPhotoGradient.
With SetGradient you can copy the visible Gradient into the script.
Do not mix the Without Stops and With stops operations. The results are unpredictable.
With AddColor you can add the color from the Color Wheel to the gradient.
With GetGradient you get a gradient where all colors have equal distances.
With Add Color with stop you can add the color from the Color Wheel at the fader position.
With Get Color and Stop at you can get the color and stop at the index position of the gradient that is selected by the the horizontal fader. The index position is shown on the right. Indexes start with zero! The highest possible index is one smaller than the amount of items in the list.
The Color is set to the Color wheel. The stop position is set to the fader.
With Modify stop you can change the stop position of the color.
With Modify Color you can assign the actual value of the Color Wheel to the index position.
With Remove you will remove the Color and stop at the index position.
The Get Gradient with stops button will show the result.

Do you have more questions? Do not hesitate to contact our team at support@ecue.com .

Have fun.

Due to the fact, that the script got a little larger, I have attached it.
Attached Files
ColorGradient, ListExtra.cs
404kb
ColorGradient_V5.0.lprj
404kb
ColorGradient_V5.1SR1.hfp
404kb
ColorGradient_with Alpha_V5.2SR1.hfp
404kb