instantreality 1.0

SFColorRGBA

The SFColorRGBA object corresponds to a X3D SFColorRGBA field.

The properties of the object can be accessed via the r, g, b and a property as well as by the indices [0] for red, [1] for green, [2] for blue and [3] for alpha.

Properties

TypePropertyDescriptionStandard
numberr

The red component of the colour [read/write].

Avalon
numberg

The green component of the colour [read/write].

Avalon
numberb

The blue component of the colour [read/write].

Avalon
numbera

The alpha component of the colour [read/write].

Avalon

Functions

Return typeFunctionDescriptionStandard
SFColorRGBA(number r, number g, number b, number a)

Constructs a new SFColorRGBA object initialized to the values of r, g, b and a.

r, g, and b are the red, green, and blue values of the colour. a is the alpha value. Missing values default to 0.0.

voidsetHSV(number h, number s, number v, number alpha)

Sets the value of the colour by specifying the values of hue, saturation, value and alpha.

Avalon
number[4]getHSV()

StringtoString()

Returns a String containing the value of r, g, b and a encoded using the X3D Classic VRML encoding.

X3D2.0