ColorSequence

**# ColorSequence

Overview

Description

The ColorSequence class represents a series of colors that can be used for creating gradients or transitions between colors in an array. It offers multiple constructor options to customize the initialization of the color sequence.

Properties

KeyPoints

array: Defines the key color points in the sequence to transition smoothly between colors.

Code Samples

local colorKeyPoints = {ColorSequenceKeyPoint.new(0, Color3.fromRGB(255, 0, 0)), ColorSequenceKeyPoint.new(1, Color3.fromRGB(0, 255, 0))}
local colorSequence = ColorSequence.new(colorKeyPoints)

Constructors

new

Creates a ColorSequence using a single Color3 color.

Parameters

Color3 color

The single color for all points in the sequence.

Return

ColorSequence

A new `ColorSequence` initialized with the provided color.

Code Samples

local singleColor = Color3.fromRGB(255, 0, 0)
local colorSequence = ColorSequence.new(singleColor)

new

Creates a ColorSequence using an array of ColorSequenceKeyPoint.

Parameters

array colorSequenceKeyPoints

An array defining the colors and their sequence positions.

Return

ColorSequence

A new `ColorSequence` based on the provided key points.

Code Samples

local keyPoints = {ColorSequenceKeyPoint.new(0, Color3.fromRGB(255, 0, 0)), ColorSequenceKeyPoint.new(1, Color3.fromRGB(0, 255, 0))}
local colorSequence = ColorSequence.new(keyPoints)

new

Creates a ColorSequence with two Color3 values, representing the beginning and ending colors of the sequence.

Parameters

Color3 c0

The starting color of the sequence.

Color3 c1

The ending color of the sequence.

Return

ColorSequence

A `ColorSequence` gradient between the two provided colors.

Code Samples

local startColor = Color3.fromRGB(255, 0, 0)
local endColor = Color3.fromRGB(0, 0, 255)
local colorSequence = ColorSequence.new(startColor, endColor)

Methods

Currently, no additional methods are described for ColorSequence.

Last updated