Skip to content

PyVista parse_color DeprecationWarning #740

Closed
@AlexanderJuestel

Description

@AlexanderJuestel

Describe the bug
GemPy has still implemented the PyVista method parse_color. It is deprecated by PyVista, see pyvista/pyvista#1377

To Reproduce

from pyvista.plotting import parse_color

parse_color('#34d42a')

.....\lib\site-packages\pyvista\plotting\tools.py:622: PyVistaDeprecationWarning: The usage of parse_color is deprecated in favor of the new Color class.
warnings.warn(
(0.20392156862745098, 0.8313725490196079, 0.16470588235294117)

pv.Color('#34d42a')

Color(hex='#34d42aff')
...

Expected behavior
No DeprecationWarning

Solution
Replace parse_color with the new Color class. A PR will be opened as soon as a possible fix is confirmed by the PyVista devs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions