<<VRML 2.0 - An Introductory view by examples

Color

[color example]                                            [run-example] 

This node defines a set of RGB colours to be used in the fields of another node (e.g. PointSet, IndexedFaceSet, IndexedLineSet). Note that textures take precedence over colours when both are specified.

{
exposedField MFColor color [ ] # a set of r-g-b colors
}


Usage :


Shape{
   geometry PointSet{coord Coordinate 
                           { point [1 1 1, 3 3 3]} # points coordinate
                     color Color 
                           { color[ 1 0 0, 0 .5 0] } # color for each point
                     }
      }

In this example the node color is used in the node PointSet to define
the points colors.