Custom control over segment colors
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 389
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
Currently, users have extraordinarily flexible control over the rendering of image layers, thanks to custom fragment shaders. It would be great to have similar flexibility for segmentation layers. Is that a realistic request? Right now, I have to choose between custom rendering (with image layers) or the selection/deselection UI (segmentation layers). Is it possible to have both?
If full flexibility is not possible in the near term, then the ability to specify a single color for all segments in a layer would be appreciated. This feature request was [discussed in a previous thread.][1] In the past I've used the saturation trick, but now I want to create multiple layers with distinct uniform segment colors (for millions of segments).
[1]: https://github.com/google/neuroglancer/issues/255#issuecomment-708716731
More brainstorming... Perhaps a simple compromise solution is to support a color table. I have millions of segments, so I can't list each one via a `segmentColors` mapping. But it would be possible for me to custom-tailor my segment IDs to target a color table of N colors (assuming `color = table[segment % N]`). Bonus points if the color table can be defined by the user, which would also provide an implicit solution to the "single color" request above. But even a hard-coded color-table would still be useful (assuming it contains a reasonable variety of colors to choose from).
Contributor guide
Assessment
This issue has not been assessed yet.