Class: Color

X3D: 3.3
Component: Rendering
Status:
fully implemented

.nodeTypes. Color

This node defines a set of RGB colors to be used in the fields of another node. Color nodes are only used to specify multiple colours for a single geometric shape, such as colours for the faces or vertices of an IndexedFaceSet. A Material node is used to specify the overall material parameters of lit geometry. If both a Material node and a Color node are specified for a geometric shape, the colours shall replace the diffuse component of the material. RGB or RGBA textures take precedence over colours; specifying both an RGB or RGBA texture and a Color node for geometric shape will result in the Color node being ignored.

HTML Encoding and Default Values

<Color color='[]' metadata='X3DMetadataObject' ></Color>

Inheritance


Constructor

Color(ctx)

Constructor for Color

Parameters:
Name Type Argument Default Description
ctx Object <optional>
null context object, containing initial settings like namespace

Fields

These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via DOM functions (i.e., using setAttribute("myFieldName", "myFieldValue") and getAttribute("myFieldName")).
Name Type Default Value Range Inheritance Standard Description
color MFColor [] [0, 1] The RGB colors.
metadata SFNode X3DMetadataObject X3DNode Field to add metadata information