Struct ColorStop
A struct that defines a single color stop.
Inherited Members
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public readonly struct ColorStop
Constructors
| Edit this page View SourceColorStop(float, in Color)
Initializes a new instance of the ColorStop struct.
Declaration
public ColorStop(float ratio, in Color color)
Parameters
Type | Name | Description |
---|---|---|
float | ratio | Where should it be? 0 is at the start, 1 at the end of the Gradient. |
Color | color | What color should be used at that point? |
Properties
| Edit this page View SourceColor
Gets the color to be used.
Declaration
public Color Color { get; }
Property Value
Type | Description |
---|---|
Color |
Ratio
Gets the point along the defined gradient axis.
Declaration
public float Ratio { get; }
Property Value
Type | Description |
---|---|
float |