Skip to content
On this page

Class: RGBA

WebSG.RGBA

Class representing an RGBA color.

Indexable

▪ [n: number]: number

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new RGBA()

Properties

a

a: number

The alpha component of the color.

Defined in

websg.d.ts:1080


b

b: number

The blue component of the color.

Defined in

websg.d.ts:1075


g

g: number

The green component of the color.

Defined in

websg.d.ts:1070


length

Readonly length: number

The number of components in the RGBA color.

Defined in

websg.d.ts:1091


r

r: number

The red component of the color.

Defined in

websg.d.ts:1065

Methods

set

set(value): RGBA

Sets the RGBA color components to the given values.

Parameters

NameTypeDescription
valueArrayLike<number>An array-like object containing the RGBA color components.

Returns

RGBA

Defined in

websg.d.ts:1086