Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyVista parse_color DeprecationWarning #740

Closed
AlexanderJuestel opened this issue Jan 7, 2023 · 0 comments
Closed

PyVista parse_color DeprecationWarning #740

AlexanderJuestel opened this issue Jan 7, 2023 · 0 comments

Comments

@AlexanderJuestel
Copy link
Contributor

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.

@AlexanderJuestel AlexanderJuestel mentioned this issue Jan 9, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant