Table of Contents

Class Gradient

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Describes a Spectrum of colors that can be combined to make a color gradient. Use BuildCoordinateColorMapping(int, int, GradientDirection) to create into gradient fill area maps.

public class Gradient
Inheritance
Gradient
Inherited Members

Constructors

Gradient(IEnumerable<Color>, IEnumerable<int>, bool)

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

Properties

Spectrum

The discrete colors that will make up the Gradient.

Methods

BuildCoordinateColorMapping(int, int, GradientDirection)

Creates a mapping starting at 0,0 and going to maxRow and maxColumn (inclusively) using the supplied direction.

Note that this method is inclusive i.e. passing 1/1 results in 4 mapped coordinates.

GetColorAtFraction(double)

Returns the color to use at the given part of the spectrum