ColorSequenceKeypoint¶
A color and time value that represents a keypoint in a ColorSequence.
Description¶
The ColorSequenceKeypoint data type represents a single keypoint in
a ColorSequence. Each keypoint has a time position between 0 and
1 and a Color3 value that defines the color at that point in the
sequence. Properties that use a ColorSequence, such as
ParticleEmitter.Color, Beam.Color, and Trail.Color,
interpolate linearly between consecutive keypoints in RGB color space.
local keypoints = {
ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)),
ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 255, 0)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 255)),
}
local colorSequence = ColorSequence.new(keypoints)
Constructors¶
new Supported Returns a ColorSequenceKeypoint from the given time and color.
Returns a ColorSequenceKeypoint from the given time and color.
Returns a ColorSequenceKeypoint with the given time and
color. The time parameter should be a number between 0 and 1, where 0
represents the beginning of the sequence and 1 represents the end. The
color parameter is a Color3 whose components must each be
between 0 and 1.
Properties¶
Time Supported The relative time at which the keypoint is located.
The relative time at which the keypoint is located.
The relative time at which this keypoint is positioned within the parent ColorSequence, expressed as a number from 0 to 1 where 0 is the beginning of the sequence and 1 is the end. Within a ColorSequence, the first keypoint must have a time of 0 and the last keypoint must have a time of 1; any intermediate keypoints must be in ascending time order. The engine linearly interpolates colors between consecutive keypoints in RGB color space based on their time positions. Defaults to 0.
Value Supported The Color3 value of the keypoint.
The Color3 value of the keypoint.
The Color3 color value at this keypoint's position in the sequence. When the engine evaluates a ColorSequence, it linearly interpolates between adjacent keypoints' color values in RGB color space based on time. Each component of the color (red, green, blue) must be between 0 and 1. Defaults to (0, 0, 0) (black).
Nova binding inventory¶
| Library | Members |
|---|---|
new |
Time, Value |
Roblox reference: ColorSequenceKeypoint