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
| Type | Property | Description | Standard |
|---|---|---|---|
| number | r | The red component of the colour [read/write].
| Avalon |
| number | g | The green component of the colour [read/write].
| Avalon |
| number | b | The blue component of the colour [read/write].
| Avalon |
| number | a | The alpha component of the colour [read/write].
| Avalon |
Functions
| Return type | Function | Description | Standard |
|---|---|---|---|
| SFColorRGBA(number r, number g, number b, number a) |
Constructs a new SFColorRGBA object initialized to the values of
r, g, and b are the red, green, and blue values of the colour. | ||
| void | setHSV(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() |
| |
| String | toString() | Returns a String containing the value of r, g, b and a encoded using the X3D Classic VRML encoding.
| X3D2.0 |