pyvista.Property.color#

property Property.color: Color[source]#

Return or set the 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'. Color will be overridden if scalars are specified.

Examples

Set the color to blue.

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

Visualize setting the property to blue.

>>> prop.color = 'b'
>>> prop.plot()
../../../_images/pyvista-Property-color-1_00_00.png

Visualize setting the color using an RGB value.

>>> prop.color = (0.5, 0.5, 0.1)
>>> prop.plot()
../../../_images/pyvista-Property-color-1_01_00.png