ColorSequence

Constructors

NameDescription
new(c: Color3)Returns a sequence of two keypoints using c for both the start and end values.
new(c0: Color3,c1: Color3)Returns a new sequence with c0 as the start value (time 0) and c1 as the end value (time 1).
new(keypoints: Array<ColorSequenceKeypoint>)Returns a new sequence from an array of ColorSequenceKeypoint values ordered by non-descending time. Must contain at least 2 and no more than 20 keypoints, starting at time 0 and ending at time 1.

Code Snippet

local part = Instance.new("Part", workspace)
local emitter = Instance.new("ParticleEmitter", part)

-- A gradient from red through cyan to purple
emitter.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)),
    ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 190, 200)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(190, 0, 255)),
})

Properties

NameTypeDescription
KeypointsArray<ColorSequenceKeypoint>An array containing the ColorSequenceKeypoint values for the ColorSequence, in ascending time order. Read-only.