summaryrefslogtreecommitdiff
path: root/gerbonara/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/utils.py')
-rw-r--r--gerbonara/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gerbonara/utils.py b/gerbonara/utils.py
index e33a7bf..933b3ca 100644
--- a/gerbonara/utils.py
+++ b/gerbonara/utils.py
@@ -292,6 +292,10 @@ class Tag:
own implementation by passing a ``tag`` parameter. """
def __init__(self, name, children=None, root=False, **attrs):
+ if (fill := attrs.get('fill')) and isinstance(fill, tuple):
+ attrs['fill'], attrs['fill-opacity'] = fill
+ if (stroke := attrs.get('stroke')) and isinstance(stroke, tuple):
+ attrs['stroke'], attrs['stroke-opacity'] = stroke
self.name, self.attrs = name, attrs
self.children = children or []
self.root = root