This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

VertexColors

VertexColors
is an option for graphics primitives which specifies the colors to assign to vertices.
  • VertexColors specifies that color should be assigned to vertex i.
  • The interior of the polygon is colored by interpolating between the colors specified by VertexColors.
  • In 3D, settings for VertexColors can include any surface or material property, to be used with simulated lighting.
  • The colors for each vertex can be an explicit color directive such as GrayLevel[g] or RGBColor, or can have the following forms:
gGrayLevel
{g,a}GrayLevel
{r,g,b}RGBColor
{r,g,b,a}RGBColor
Specify vertex colors for 2D polygons:
Specify vertex colors for 3D polygons:
Specify vertex colors for 2D lines:
Specify vertex colors for 3D lines:
Specify vertex colors for tubes:
Specify vertex colors for 2D points:
Specify vertex colors for 3D points:
Opacity can be specified for each vertex as well:
Assign colors for shared vertices:
Specify vertex colors for 2D polygons:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex colors for 3D polygons:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex colors for 2D lines:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex colors for 3D lines:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex colors for tubes:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex colors for 2D points:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex colors for 3D points:
In[1]:=
Click for copyable input
Out[1]=
 
Opacity can be specified for each vertex as well:
In[1]:=
Click for copyable input
Out[1]=
 
Assign colors for shared vertices:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
Some plot functions, such as ListPlot3D, support VertexColors:
Create opacity gradients on 3D polygons:
Use an image from ExampleData:
Plot the dataset with vertex colors, simulating the texture:
New in 6