Skip to content

Commit cbd454a

Browse files
authored
"Color by column" now works again (#124)
1 parent 42b81a9 commit cbd454a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/spatialdata_plot/pl/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,8 @@ def _get_colors_for_categorical_obs(
686686
if isinstance(palette, str):
687687
cmap = plt.get_cmap(palette)
688688
palette = [to_hex(x) for x in cmap(color_idx, alpha=alpha)]
689+
elif isinstance(palette, list):
690+
palette = [to_hex(x) for x in palette]
689691
elif isinstance(palette, ListedColormap):
690692
palette = [to_hex(x) for x in palette(color_idx, alpha=alpha)]
691693
elif isinstance(palette, LinearSegmentedColormap):

0 commit comments

Comments
 (0)