pyvista.Property.specular_color

pyvista.Property.specular_color#

property Property.specular_color: Color[source]#

Return or set the specular 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 specular color and visualize it with specular = 0.5 and Phong shading.

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

Visualize red specular color.

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

Visualize white specular color.

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