pyvista.Color.name

Contents

pyvista.Color.name#

property Color.name: str | None[source]#

Get the color name.

See Color Table for a list of supported colors.

Returns:
str | None

The color name, in case this color has a name; otherwise None.

Examples

Create a blue color with half opacity.

>>> import pyvista as pv
>>> c = pv.Color("blue", default_opacity=0.5)
>>> c
Color(name='blue', hex='#0000ff80', opacity=128)