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

Set the diffuse color to blue.

>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.diffuse_color = 'b'
>>> prop.diffuse_color
Color(name='blue', hex='#0000ffff', opacity=255)

Visualize setting the diffuse color to white with diffuse = 0.5

>>> prop.diffuse = 0.5
>>> prop.diffuse_color = 'w'
>>> prop.plot()
../../../_images/pyvista-Property-diffuse_color-1_00_00.png