ColorSeries¶
Color series is a data type that represents a collection of color and points, also known as gradient.
Properties¶
- PointCount:
number
Methods¶
New() → ColorSeries¶
Create color series by this color range
New(min: Color, max: Color) → ColorSeries¶
Create color series by this color range
Clear() → nil¶
Clear this ColorSeries
SetColor(point: number, color: Color) → nil¶
Sets the color at the specified point in the color series.
RemovePoint(point: number) → nil¶
Removes the point at the specified index from the color series.
GetOffsets() → { number }¶
Get all offsets
GetColors() → { Color }¶
Get all colors
SetOffset(point: number, offset: number) → nil¶
Sets the offset at the specified point in the color series.
GetColor(point: number) → Color¶
Gets the color at the specified point in the color series.
GetOffset(point: number) → number¶
Gets the offset at the specified point in the color series.
AddPoint(offset: number, color: Color) → number¶
Add color point to the series with offset
Lerp(t: number) → Color¶
Interpolates between colors in the series based on the parameter t.