s&box docs

public sealed struct Sandbox.Gradient

Describes a gradient between multiple colors

Broader workflow and conceptual references connected to this API.

Constructors

Showing 2 constructors

Methods

Showing 8 methods

public Color Evaluate(float time)

Evaluate the blend using the time, which is generally between 0 and 1

public void FixOrder()

If the lists aren't in time order for some reason, this will fix them. This should really just be called when serializing, and in every other situation we should assume they're okay.

public static Sandbox.Gradient FromColors(Color[] colors)

Create a gradient from colors spaced out evenly

Properties

Showing 4 properties

public System.Collections.Immutable.ImmutableList`1<Sandbox.Gradient.AlphaFrame> Sandbox.Gradient.Alphas { get; set; }

A list of color stops, which should be ordered by time

public Sandbox.Gradient.BlendMode Sandbox.Gradient.Blending { get; set; }

The blend mode

public System.Collections.Immutable.ImmutableList`1<Sandbox.Gradient.ColorFrame> Sandbox.Gradient.Colors { get; set; }

A list of color stops, which should be ordered by time

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.System
Doc IDT:Sandbox.Gradient

On this page