Struct ColorGradientAlphaStopData
Serializable data for a single gradient alpha stop, suitable for Unity Inspector editing and JSON serialization. Provides bidirectional conversion with the immutable ColorGradientAlphaStop type.
Inherited Members
Namespace: Scylla.Core.Util.Palette
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public struct ColorGradientAlphaStopData
Constructors
ColorGradientAlphaStopData(float, float, ColorGradientStopInterpolation, float)
Creates a new alpha stop data entry.
Declaration
public ColorGradientAlphaStopData(float offset, float alpha, ColorGradientStopInterpolation interpolation = ColorGradientStopInterpolation.None, float midpoint = 0.5)
Parameters
| Type | Name | Description |
|---|---|---|
| float | offset | Normalized position [0, 1]. |
| float | alpha | Alpha value [0, 1]. |
| ColorGradientStopInterpolation | interpolation | Per-segment easing curve override. |
| float | midpoint | Interpolation midpoint (0, 1). Defaults to 0.5. |
Fields
Alpha
Alpha (opacity) value at this stop [0, 1].
Declaration
[Range(0, 1)]
[Tooltip("Alpha (opacity) at this stop (0 = transparent, 1 = opaque).")]
public float Alpha
Field Value
| Type | Description |
|---|---|
| float |
Interpolation
Per-segment easing curve override for the transition to the next alpha stop.
Declaration
[Tooltip("Easing curve for the segment from this alpha stop to the next. None = straight-line.")]
public ColorGradientStopInterpolation Interpolation
Field Value
| Type | Description |
|---|---|
| ColorGradientStopInterpolation |
Midpoint
Interpolation midpoint between this stop and the next, in the range (0, 1). Defaults to 0.5 (centered). Shifts where the 50% blend point falls.
Declaration
[Range(0.01, 0.99)]
[Tooltip("Midpoint of the blend between this stop and the next (0.5 = centered).")]
public float Midpoint
Field Value
| Type | Description |
|---|---|
| float |
Offset
Normalized position along the gradient [0, 1].
Declaration
[Range(0, 1)]
[Tooltip("Position along the gradient (0 = start, 1 = end).")]
public float Offset
Field Value
| Type | Description |
|---|---|
| float |