Struct ColorGradientStopData
Serializable data for a single gradient stop, suitable for Unity Inspector editing.
Inherited Members
Namespace: Scylla.Core.Util.Palette
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public struct ColorGradientStopData
Constructors
ColorGradientStopData(float, Color, ColorGradientStopInterpolation, float, bool, ColorStopBlendMode)
Creates a new gradient stop data entry.
Declaration
public ColorGradientStopData(float offset, Color color, ColorGradientStopInterpolation interpolation = ColorGradientStopInterpolation.None, float midpoint = 0.5, bool isMuted = false, ColorStopBlendMode blendMode = ColorStopBlendMode.Normal)
Parameters
| Type | Name | Description |
|---|---|---|
| float | offset | Normalized position [0, 1]. |
| Color | color | RGBA color at this stop. |
| ColorGradientStopInterpolation | interpolation | Per-stop interpolation override. |
| float | midpoint | Interpolation midpoint (0, 1). Defaults to 0.5. |
| bool | isMuted | When true, the stop is skipped during evaluation. |
| ColorStopBlendMode | blendMode | Per-segment color blend operator override. |
Fields
BlendMode
Per-segment color blend operator applied between this stop and the next. Normal uses the gradient's straight-line interpolation; other modes (Multiply, Screen, Add) operate in linear-light.
Declaration
[Tooltip("Color blend operator for the segment from this stop to the next. Normal = straight-line.")]
public ColorStopBlendMode BlendMode
Field Value
| Type | Description |
|---|---|
| ColorStopBlendMode |
Color
RGBA color at this stop.
Declaration
[Tooltip("Color at this gradient stop.")]
public Color Color
Field Value
| Type | Description |
|---|---|
| Color |
Interpolation
Per-stop interpolation override for the transition to the next stop.
Declaration
[Tooltip("Interpolation curve override. None = use gradient default.")]
public ColorGradientStopInterpolation Interpolation
Field Value
| Type | Description |
|---|---|
| ColorGradientStopInterpolation |
IsMuted
When true, this stop is excluded from gradient evaluation. The data
is still preserved (so the user can re-activate the stop later); only
Evaluate(float) and downstream renderers skip over
muted stops. Used by the gradient editor's Reduction slider for
non-destructive collapsing of near-identical adjacent stops.
Declaration
[Tooltip("Muted stops are kept in the asset but skipped by gradient evaluation.")]
public bool IsMuted
Field Value
| Type | Description |
|---|---|
| bool |
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 |