Skip to content
On this page

Class: RGB

WebSG.RGB

Class representing an RGB color.

Indexable

▪ [n: number]: number

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new RGB()

Properties

b

b: number

The blue component of the color.

Defined in

websg.d.ts:1039


g

g: number

The green component of the color.

Defined in

websg.d.ts:1034


length

Readonly length: number

The number of components in the RGB color.

Defined in

websg.d.ts:1050


r

r: number

The red component of the color.

Defined in

websg.d.ts:1029

Methods

set

set(value): RGB

Sets the RGB color components to the given values.

Parameters

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

Returns

RGB

Defined in

websg.d.ts:1045