Skip to content

Commit 8f44f5f

Browse files
committed
Fix base colors max numbers
1 parent 9f30bd5 commit 8f44f5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

panel/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def base_colors(res):
156156
all_colors = sd.palette(res.states)
157157
colors = all_colors[:: res.states[0]]
158158
colors = [mpl.colors.rgb2hex(color, keep_alpha=False) for color in colors]
159-
return colors
159+
return colors[: res.states[0]] # ensure not more colors than states
160160

161161

162162
def update_colors_select(event):

0 commit comments

Comments
 (0)