From 8ec388852a491f78df5bbfd755c5cd16df7fe378 Mon Sep 17 00:00:00 2001 From: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> Date: Sun, 15 Jun 2025 01:23:49 +0200 Subject: [PATCH] Allow rgba colors --- ete4/treeview/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ete4/treeview/main.py b/ete4/treeview/main.py index 3af4faa4e..cb029f815 100644 --- a/ete4/treeview/main.py +++ b/ete4/treeview/main.py @@ -17,7 +17,7 @@ def a_wrapper_accepting_arguments(*args, **kargs): _LINE_TYPE_CHECKER = lambda x: x in (0, 1, 2) _SIZE_CHECKER = lambda x: isinstance(x, int) -_COLOR_MATCH = re.compile(r"^#[A-Fa-f\d]{6}$") +_COLOR_MATCH = re.compile(r"^#[A-Fa-f\d]{6,8}$") _COLOR_CHECKER = lambda x: x.lower() in SVG_COLORS or re.match(_COLOR_MATCH, x) _NODE_TYPE_CHECKER = lambda x: x in ["sphere", "circle", "square"] _BOOL_CHECKER = lambda x: isinstance(x, bool) or x in (0, 1)