Skip to content

Commit f5f46bc

Browse files
author
Sonja Stockhaus
committed
fix type error
1 parent 6afd96d commit f5f46bc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/spatialdata_plot/pl/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,12 @@ def _set_outline(
607607
# inner outline default color: white
608608
outline_color = (outline_color, "#ffffffff")
609609
if isinstance(outline_color, tuple):
610-
if len(outline_color) == 1:
610+
if len(outline_color) == 4 and all(isinstance(i, float) for i in outline_color):
611+
# may be an RGBA color tuple
612+
outline_color = (outline_color, "#ffffffff")
613+
elif len(outline_color) == 1:
611614
# interpreted as outer outline
612-
outline_color = (outline_color[0], "white")
615+
outline_color = (outline_color[0], "#ffffffff")
613616
elif len(outline_color) > 2:
614617
# only using first to positions
615618
logger.warning(

0 commit comments

Comments
 (0)