Skip to content

fix(napari): cycle glasbey colours via CyclicLabelColormap#42

Merged
lguerard merged 1 commit into
mainfrom
fix/napari-cyclic-glasbey
Jun 25, 2026
Merged

fix(napari): cycle glasbey colours via CyclicLabelColormap#42
lguerard merged 1 commit into
mainfrom
fix/napari-cyclic-glasbey

Conversation

@lguerard

Copy link
Copy Markdown
Contributor

Bug

Labels rendered as one flat colour (all green). Passing the raw glasbey.create_palette(...) list to add_labels(colormap=...) makes napari map large label IDs past the end of the palette.

Fix

Build the glasbey palette, convert to RGBA, and wrap it in a napari.utils.colormaps.CyclicLabelColormap — each label value now cycles through a distinct glasbey colour. (Restores the working mechanism from before the gallery-style refactor, but keeps the glasbey package.)

🤖 Generated with Claude Code

Passing the raw glasbey palette list to add_labels made napari map large
label IDs past the end of the palette, so every cell rendered one flat
colour (green). Wrap the palette in a CyclicLabelColormap so each label
value cycles through a distinct colour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lguerard lguerard merged commit 678a21f into main Jun 25, 2026
2 checks passed
@lguerard lguerard deleted the fix/napari-cyclic-glasbey branch June 25, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant