AdvancedRandom.Gradient is lower level than your expecting. It doesn't operate at Sprite level. You give it a value and it returns the output of the mathematical linear gradient function, which you have defined by adding color stops.
You have specified that at 0 the gradient is red and at 1 the color is green. So the result for various values would be:
- 0 = rgb(100%, 0%, 0%)
- 0.25 = rgb(75%, 25%, 0%)
- 0.5 = rgb(50%, 50%, 0%)
- 0.75 = rgb(25%, 75%, 0%)
- 1 = rgb(0%, 100%, 0%)
The range is dependent on the position of the color stop, if you set the second stop at a position of 2 then the range would be 0 to 2 instead.
The easiest way to convert this function into a colour is to use DrawingCanvas. The getting started with advanced random shows some examples towards the end of converting the output of a noise function into a colour using the gradient function. If you change the input expression to something like AdvancedRandom.Gradient(y / DrawingCanvas.SnapshotHeight)
it would give you a gradient like shown in the pictures.