Property.diffuse_color#
- property Property.diffuse_color: Color[source]#
Return or set the diffuse color of this property.
Either a string, RGB list, or hex color string. For example:
color='white',color='w',color=[1.0, 1.0, 1.0], orcolor='#FFFFFF'.
Examples#
Download Python source code | Download Jupyter notebook
Get the default diffuse color and visualize it with diffuse = 0.5.
>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.ambient_color
Color(name='light_blue', hex='#add8e6ff', opacity=255)
>>> prop.diffuse = 0.5
>>> prop.plot()
Visualize red diffuse color.
>>> prop.diffuse_color = 'red'
>>> prop.plot()
Visualize white diffuse color.
>>> prop.diffuse_color = 'white'
>>> prop.plot()