Constructor Gradient | Terminal.Gui v2 (original) (raw)

Namespace

Terminal.Gui

Assembly

Terminal.Gui.dll

Gradient(IEnumerable, IEnumerable, bool)

Creates a new instance of the Gradient class which hosts a Spectrumof colors including all stops and steps interpolated colors between each corresponding pair.

public Gradient(IEnumerable<Color> stops, IEnumerable<int> steps, bool loop = false)

Parameters

stops IEnumerable<Color>

The colors to use in the spectrum (N)

steps IEnumerable<int>

The number of colors to generate between each pair (must be N-1 numbers). If only one step is passed then it is assumed to be the same distance for all pairs.

loop bool

True to duplicate the first stop and step so that the gradient repeats itself

Exceptions

ArgumentException