Struct ColorStop
- Namespace
- SixLabors.ImageSharp.Drawing.Processing
- Assembly
- SixLabors.ImageSharp.Drawing.dll
A struct that defines a single color stop: a color pinned to a position along a gradient.
public readonly struct ColorStop
- Inherited Members
Constructors
ColorStop(float, in Color)
Initializes a new instance of the ColorStop struct.
public ColorStop(float ratio, in Color color)
Parameters
ratiofloatThe position of the stop along the gradient, where 0 is the start and 1 is the end of the gradient.
colorColorThe color of the gradient at the stop position.
Properties
Color
Gets the color of the gradient at the stop position.
public Color Color { get; }
Property Value
Ratio
Gets the position of the stop along the gradient, where 0 is the start and 1 is the end.
public float Ratio { get; }