# Examples from pyvista.Color.name
# ================================

# Create a dark blue color with half opacity.
import pyvista as pv
c = pv.Color('darkblue', default_opacity=0.5)
c

# When creating a new `Color`, the name may be delimited with a space,
# hyphen, underscore, or written as a single word.
c = pv.Color('dark blue', default_opacity=0.5)

# Upper-case letters are also supported.
c = pv.Color('DarkBlue', default_opacity=0.5)

# However, the name is always standardized as lower-case with an underscore between words.
c

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

