Skip to main content

Color

Description:

  A color with red, green, blue, and alpha channels.

Class Object: Color Class.

r

Type: Field.

Description:

  The red channel of the color, should be 0 to 255.

Signature:

r: integer

g

Type: Field.

Description:

  The green channel of the color, should be 0 to 255.

Signature:

g: integer

b

Type: Field.

Description:

  The blue channel of the color, should be 0 to 255.

Signature:

b: integer

a

Type: Field.

Description:

  The alpha channel of the color, should be 0 to 255.

Signature:

a: integer

opacity

Type: Field.

Description:

  Another representation for alpha channel. The opacity of the color, ranging from 0 to 1.

Signature:

opacity: number

toColor3

Type: Function.

Description:

  Converts the color to a Color3 value without alpha channel.

Signature:

toColor3: function(self: Color): Color3

Returns:

Return TypeDescription
Color3Converted Color3 value.

toARGB

Type: Function.

Description:

  Converts the color to an ARGB integer value.

Signature:

toARGB: function(self: Color): integer

Returns:

Return TypeDescription
integerConverted ARGB integer.