More than 256 colors

Hi,
I have a volume with multiple labeled instances and I would like to have more than 256 colors to show each instance with a different color. I tried to make a custom color table because all the existing ones are limited to 256 colors. I saved the existing color table and modified the text file to include more than 256 colors, but when I import it to Slicer it doesn’t show up.

Is there a way to have more than 256 colors in a color table?
Best regards,
Manca

There are several color tables with more than 256 entries, for example the General Anatomy Colors: https://github.com/Slicer/Slicer/blob/master/Base/Logic/Resources/ColorFiles/GenericAnatomyColors.txt

Thank you for your answer. I need more than 500 colors which I didn’t find in any of the color tables.

You can have color maps up to 65535 entries. We could enable up to 4 billion labels, but that would require a few small changes in the code and it has not been necessary so far.

Thank you for your answer. Is there an easy way to add more colors to color table? I know I can manually add each color but it is too slow for a higher number of colors. As I mentioned I tried to modify the exported and saved color table but I can not import it. When I import it it does not show up.

You can edit the color table in Excel (you can split text to colums using “space” as a delimiter for convenience) or any text editor and load it into Slicer.