Color3
- class cee.Color3()
An immutable three component (RGB) color.
The color components (r,g,b) are in the range 0..1.
Note that this class is immutable.
Constructors
Methods
Constructors
- Color3.constructor(r, g, b)
- Arguments:
r (
number
) – Noneg (
number
) – Noneb (
number
) – None
Creates a color object.
- Return type:
Color3
Properties
- Color3.b
- Type:
number
The blue component of the color. Range: 0..1
- Color3.g
- Type:
number
The green component of the color. Range: 0..1
- Color3.r
- Type:
number
The red component of the color. Range: 0..1
Methods
equals
- Color3.equals(other)
- Arguments:
other (
Color3Like
) – None
Returns true if the colors are equal.
- Return type:
boolean
static from
- Color3.from(color)
- Arguments:
color (
Color3Like
) – None
Creates a Color3 instance from any object with r,g,b properties
- Return type:
Color3
static fromArray
- Color3.fromArray(arr)
- Arguments:
arr (
ArrayLike
) – None
Creates a new Color3 instance from the first 3 elements of the given array.
- Return type:
Color3
static fromColor4
- Color3.fromColor4(color)
- Arguments:
color (
Color4Like
) – None
Creates a Color3 instance from the r,g,b properties of the given RGBA color, ignoring the alpha channel
- Return type:
Color3