help > RE: Adjusting color for ROI figure
Jan 23, 2025  02:01 PM | Chris Rorden
RE: Adjusting color for ROI figure

I think currently the RGB value is the default color for the atlas. We have added support for allowing each label to have a custom transparency (Alpha) and RGB in NiiVue, and it is on the roadmap to back port these colormaps to Surfice and MRIcroGL


The NiiVue colormaps are described here:


 


https://github.com/niivue/niivue/blob/main/docs/development-notes/colormaps.md


You can try this out in the live demo:


https://niivue.github.io/niivue/features/segment.html


 


Note in the live demo you can paste and apply a custom color table. For example, to make gray matter opaque and the other labels transparent you would set the "A"lpha like this:


 


let cmap = {
 R: [0,   0, 120, 175],
 G: [0,  90,  60, 185],
 B: [0, 120,  60, 175],
 A: [0, 0,  255, 0],
 labels: ["air","CSF","gray","white"],
};

Threaded View

TitleAuthorDate
Tom Willems Jan 22, 2025
RE: Adjusting color for ROI figure
Chris Rorden Jan 23, 2025