pyvista.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], or color='#FFFFFF'.

Examples

Get the default diffuse color and visualize it with diffuse = 0.5.

>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.ambient_color
Color(name='lightblue', hex='#add8e6ff', opacity=255)
>>> prop.diffuse = 0.5
>>> prop.plot()
../../../_images/pyvista-Property-diffuse_color-1_00_00.png

Visualize red diffuse color.

>>> prop.diffuse_color = 'red'
>>> prop.plot()
../../../_images/pyvista-Property-diffuse_color-1_01_00.png

Visualize white diffuse color.

>>> prop.diffuse_color = 'white'
>>> prop.plot()
../../../_images/pyvista-Property-diffuse_color-1_02_00.png