# More than 256 colors

**URL:** <https://discourse.slicer.org/t/more-than-256-colors/13369>\
**Category:** Support\
**Tags:** custom-color-table\
**Created:** [September 7, 2020, 10:23am UTC](https://discourse.slicer.org/t/more-than-256-colors/13369 "2020-09-07T10:23:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MancaZerovnik](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mancazerovnik/32/1400_2.png) [@MancaZerovnik](https://discourse.slicer.org/u/MancaZerovnik)\
**Post date:** [September 7, 2020, 10:23am UTC](https://discourse.slicer.org/t/more-than-256-colors/13369/1 "2020-09-07T10:23:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 7, 2020, 2:04pm UTC](https://discourse.slicer.org/t/more-than-256-colors/13369/2 "2020-09-07T14:04:16Z")

</div>

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](https://github.com/Slicer/Slicer/blob/master/Base/Logic/Resources/ColorFiles/GenericAnatomyColors.txt)

---

<div class="post-metadata">

**Author:** ![MancaZerovnik](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mancazerovnik/32/1400_2.png) [@MancaZerovnik](https://discourse.slicer.org/u/MancaZerovnik)\
**Post date:** [September 8, 2020, 8:13am UTC](https://discourse.slicer.org/t/more-than-256-colors/13369/3 "2020-09-08T08:13:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 8, 2020, 12:14pm UTC](https://discourse.slicer.org/t/more-than-256-colors/13369/4 "2020-09-08T12:14:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MancaZerovnik](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mancazerovnik/32/1400_2.png) [@MancaZerovnik](https://discourse.slicer.org/u/MancaZerovnik)\
**Post date:** [September 8, 2020, 12:33pm UTC](https://discourse.slicer.org/t/more-than-256-colors/13369/5 "2020-09-08T12:33:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 8, 2020, 12:37pm UTC](https://discourse.slicer.org/t/more-than-256-colors/13369/6 "2020-09-08T12:37:29Z")

</div>

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.
