VertexColors
is an option for graphics primitives which specifies the colors to assign to vertices.
Details
- VertexColors can be used with Polygon, Line, Tube, Point, and GraphicsComplex.
- VertexColors->{col1,col2,…} specifies that color coli 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 coli for each vertex can be an explicit color directive such as GrayLevel[g] or RGBColor[r,g,b], or can have the following forms:
-
g GrayLevel[g] {g,a} GrayLevel[g,a] {r,g,b} RGBColor[r,g,b] {r,g,b,a} RGBColor[r,g,b,a]
Examples
open allclose allBasic Examples (9)
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:
Scope (1)
Some plot functions, such as ListPlot3D, support VertexColors:
Neat Examples (2)
Create opacity gradients on 3D polygons:
Use an image from ExampleData:
Plot the dataset with vertex colors, simulating the texture:
Text
Wolfram Research (2007), VertexColors, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexColors.html (updated 2008).
CMS
Wolfram Language. 2007. "VertexColors." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/VertexColors.html.
APA
Wolfram Language. (2007). VertexColors. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexColors.html