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.

Index

Constructors

Properties

Methods

Constructors

cee.Color3.constructor()
Color3(r: number, g: number, b: number): Color3

Creates a color object.

Parameters

r: number

g: number

b: number

Returns: Color3

Properties

cee.Color3.b

readonly

b: number

The blue component of the color. Range: 0..1

cee.Color3.g

readonly

g: number

The green component of the color. Range: 0..1

cee.Color3.r

readonly

r: number

The red component of the color. Range: 0..1

Methods

cee.Color3.equals()
equals(other: Color3Like): boolean

Returns true if the colors are equal.

Parameters

other: Color3Like

Returns: boolean

static cee.Color3.from()

static

from(color: Color3Like): Color3

Creates a Color3 instance from any object with r,g,b properties

Parameters

color: Color3Like

Returns: Color3

static cee.Color3.fromArray()

static

fromArray(arr: ArrayLike): Color3

Creates a new Color3 instance from the first 3 elements of the given array.

Parameters

arr: ArrayLike

Returns: Color3

static cee.Color3.fromColor4()

static

fromColor4(color: Color4Like): Color3

Creates a Color3 instance from the r,g,b properties of the given RGBA color, ignoring the alpha channel

Parameters

color: Color4Like

Returns: Color3