Skip to content

GradientStop

StructChartGuruChartGuru
public readonly struct GradientStop

A color stop at an explicit location within a gradient. Swift Charts equivalent: Gradient.Stop(color: .red, location: 0.5).

public readonly Color Color

Returns

UnityEngine.Color

public readonly float Location

Returns

System.Single

public GradientStop(Color color, float location)

Creates a color stop and clamps its normalized gradient location to the range from zero to one.

Parameters

Name Type
color UnityEngine.Color
location System.Single