We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3805668 commit 14e18baCopy full SHA for 14e18ba
src/tikzplotlib/_color.py
@@ -29,7 +29,11 @@
29
def _get_closest_colour_name(rgb):
30
match = None
31
mindiff = 1.0e15
32
- hex_names_dict = webcolors.CSS3_HEX_TO_NAMES if hasattr(webcolors, "CSS3_HEX_TO_NAMES") else webcolors._CSS3_HEX_TO_NAMES
+ hex_names_dict = (
33
+ webcolors.CSS3_HEX_TO_NAMES
34
+ if hasattr(webcolors, "CSS3_HEX_TO_NAMES")
35
+ else webcolors._definitions._CSS3_HEX_TO_NAMES
36
+ )
37
for h, name in hex_names_dict.items():
38
r = int(h[1:3], 16)
39
g = int(h[3:5], 16)
0 commit comments