Repository navigation
Add cat35 categorical palette (BSD-compatible substitute for fs_colours2 from #91) - #160
Merged
Merged
Conversation
The remaining unmerged piece of #91 was fs_colours2, a 35-entry palette copied from FreeSurfer's color LUT. FreeSurfer's license is non-commercial only, incompatible with BSD-3, so the palette could not ship as-is. Add cat35 instead: same 35-entry size (matches Desikan-Killiany cortical parcellation: 34 labels + 1 unknown/medial-wall slot), built deterministically from matplotlib's tab20 + tab20b qualitative colormaps (PSF/BSD license). Construction lives in _build_cat35() so the source is auditable instead of hand-listed. Tests verify the registration, shape, opaque alpha, distinct entries, and the leading black slot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the last unmerged piece of #91.
Why a substitute, not the original
The original `fs_colours2` array is a verbatim copy of FreeSurfer's parcellation color LUT. FreeSurfer is licensed for non-commercial use only, which is incompatible with BrainSpace's BSD-3 license. Shipping those exact RGB tuples would create a license-mismatch downstream.
What this is
A 35-entry palette named `cat35`:
Test plan