# Custom color terms

**URL:** <https://discourse.slicer.org/t/custom-color-terms/42205>\
**Category:** Support\
**Created:** [March 18, 2025, 5:01pm UTC](https://discourse.slicer.org/t/custom-color-terms/42205 "2025-03-18T17:01:47Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 18, 2025, 5:01pm UTC](https://discourse.slicer.org/t/custom-color-terms/42205/1 "2025-03-18T17:01:47Z")

</div>

With the new custom color table, if I do not want to use a terminology, just want to create custom color/label set to be used during segmentation, what should I enter into these fields:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/b/9b1fb196b57031c4c6a230d2b3553fc8d3ec86a5.png)

I think there was a custom value, but I can’t remember how to enter it.

Because if I leave them blank, this color table does not show up in the terminology module.

---

<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:** [March 19, 2025, 2:28am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/2 "2025-03-19T02:28:34Z")

</div>

You can use Tissue/Tissue when you do not have any information on what the segment contains. Let us know how it works.

We could tune the behavior to allow color table without any terminology information to be used in terminology selectors. But it would be also good to learn about what prevents people from using terminology. When you want use the segmentation, you need a clear definition of what each segment contains. You could choose to first do the segmentation and then define what is in each segment, but that would not save time and there would be a higher risk that the segmentation is not consistent with the specification (because the specification did not exist when the segmentation was done).

Standard terminology in itself does not solve all problems. For example, most terminologies do not provide exact specification or segmentation instructions fit each term. But without using standard terms (or at least some predefined custom terms), it is hard to do anything robustly.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [March 19, 2025, 2:49am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/3 "2025-03-19T02:49:17Z")

</div>

> [@lassoan](#):
>
> But it would be also good to learn about what prevents people from using terminology.

What terminology would I use when segmenting luminescent signal from a given mouse as in [Add support for managing and blending arbitrary number of layers in Slice viewer by jcfr · Pull Request #8210 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/pull/8210#pullrequestreview-2648387394)? I’m getting image based statistics for a luminescent source being shown in a 2D projection type capture. I’m not segmenting a specific structure from this type of image but selecting a region of intensity.

---

<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:** [March 19, 2025, 3:36am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/4 "2025-03-19T03:36:45Z")

</div>

If you don’t segment a specific structure then the standard anatomical terminologies would not be useful for you, but you can introduce your own codes and specify what they mean. You can specify your own coding scheme where all your codes are defined in. If you start the coding scheme name with the `99` prefix then you do not need to register it with any authority. You then define “categories” and in each category a list of “types”. For each type you define a code value, meaning, default color, optionally modifiers. You can optionally also specify region and region modifier (it does not have to be anatomic region).

For example, you could use `99REVVITY` as coding scheme designator for all your codes. A category could be defined as `("99REVVITY", "LUM", "Luminescence")`, a type could be `("99REVVITY", "LSABC123", "Luminescent source ABC123")`, modifiers could be `("99REVVITY", "LMENH", "Enhanced luminescence")` and `("99REVVITY", "LMUS, "Ultra-sensitive luminescence")`.

In the documentation you can find more information on how to define custom terminolologies using [color tables](https://slicer.readthedocs.io/en/latest/developer_guide/modules/colors.html#color-table-csv-file-format-csv) or [terminology json files](https://slicer.readthedocs.io/en/latest/user_guide/modules/terminologies.html#how-to).

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 19, 2025, 4:01am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/5 "2025-03-19T04:01:49Z")

</div>

> [@lassoan](#):
>
> You can use Tissue/Tissue when you do not have any information on what the segment contains. Let us know how it works.

I ended up entering Tissue to Value field of Category and Type. Is that what am I supposed to do?

When I try to use this color table in segmentation, it worked and I was able to pull the terms from it, but it the selection in the terminology did not stick like the properly created color tables. Ie., every time I had to choose this specific color table from the drop down menu of the Terminology selector module. Is that because of the other missing fields?

Otherwise, it seemed to work.

---

<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:** [March 19, 2025, 4:36am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/6 "2025-03-19T04:36:39Z")

</div>

> [@muratmaga](#):
>
> I ended up entering Tissue to Value field of Category and Type. Is that what am I supposed to do?

Yes, exactly.

> [@muratmaga](#):
>
> When I try to use this color table in segmentation, it worked and I was able to pull the terms from it, but it the selection in the terminology did not stick like the properly created color tables. Ie., every time I had to choose this specific color table from the drop down menu of the Terminology selector module. Is that because of the other missing fields?

I could not reproduce this. For me, after I select a color from that color table, for all newly created segments the same color table is offered. Can you describe the exact steps you make (or take a screen capture video)?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 19, 2025, 4:43am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/7 "2025-03-19T04:43:29Z")

</div>

Try with this file. It reproduces for me with this:

> <https://github.com/SlicerMorph/terms-and-colors/blob/main/E15_Mouse_Embryo.csv>

---

<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:** [March 19, 2025, 4:59am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/8 "2025-03-19T04:59:29Z")

</div>

I see. The issue is that a code value cannot be defined without a coding scheme. Also, a code value is typically not a human-readable name. It is better to use a standard terminology.

**Instead of:**

| LabelValue | Name | Color\_R | Color\_G | Color\_B | Color\_A | Category\_CodingScheme | Category\_CodeValue | Category\_CodeMeaning | Type\_CodingScheme | Type\_CodeValue | Type\_CodeMeaning |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | left lung | 197 | 165 | 145 | 255 | | Tissue | | | Tissue | |

**You can use:**

| LabelValue | Name | Color\_R | Color\_G | Color\_B | Color\_A | Category\_CodingScheme | Category\_CodeValue | Category\_CodeMeaning | Type\_CodingScheme | Type\_CodeValue | Type\_CodeMeaning |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | left lung | 197 | 165 | 145 | 255 | SCT | 85756007 | Tissue | SCT | 85756007 | Tissue |

**It is even better to use:**

| LabelValue | Name | Color\_R | Color\_G | Color\_B | Color\_A | Category\_CodingScheme | Category\_CodeValue | Category\_CodeMeaning | Type\_CodingScheme | Type\_CodeValue | Type\_CodeMeaning | TypeModifier\_CodingScheme | TypeModifier\_CodeValue | TypeModifier\_CodeMeaning | Region\_CodingScheme | Region\_CodeValue | Region\_CodeMeaning | RegionModifier\_CodingScheme | RegionModifier\_CodeValue | RegionModifier\_CodeMeaning |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | left lung | 197 | 165 | 145 | 255 | SCT | 123037004 | Anatomical Structure | SCT | 39607008 | Lung | SCT | 7771000 | Left | | | | | | |

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 19, 2025, 5:08am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/9 "2025-03-19T05:08:43Z")

</div>

Thats just an example which I converted from an older color map we used to the new one. I really do not want to go into SCT or other things to pull all the fields, since it is a bit tedious.

Going back to what @jamesobutler asked, what should we enter to those fields when we have to make do without an ontology and or a reference terminology?

I thought we had discussed things like “custom” or something we can enter to distinguish when I have to make do with a term

---

<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:** [March 19, 2025, 5:22am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/10 "2025-03-19T05:22:33Z")

</div>

`(SCT,85756007)` is a standard way to tell that it is some kind of tissue that you don’t want to describe more specifically. You could use a custom code like `(99SLICERMORPH,123)` but that would not be much simpler (and you would need to document it somewhere).

To look up the SCT code takes 4 clicks (double-click to open the terminology selector, click “Select from terminology”, double-click “Tissue”, click “Save”). We could add a “use default” terminology button in the “Edit terminology” dialog (that would set the Tissue/Tissue codes), but that would still require 3 clicks from the user, so it would only save a single click. Maybe we could add an advanced section below the color table in Colors module that would allow changing the terminology for all selected items? You could then select all entries and set Tissue / Tissue via the terminology selector only once.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 19, 2025, 5:23am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/11 "2025-03-19T05:23:37Z")

</div>

> [@lassoan](#):
>
> `(SCT,85756007)` is a standard way to tell that it is some kind of tissue that you don’t want to describe more specifically.

If that’s what it is for, that is good enough for me.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 19, 2025, 5:37am UTC](https://discourse.slicer.org/t/custom-color-terms/42205/12 "2025-03-19T05:37:53Z")

</div>

> [@lassoan](#):
>
> To look up the SCT code takes 4 clicks (double-click to open the terminology selector, click “Select from terminology”, double-click “Tissue”, click “Save”). We could add a “use default” terminology button in the “Edit terminology” dialog (that would set the Tissue/Tissue codes), but that would still require 3 clicks from the user, so it would only save a single click. Maybe we could add an advanced section below the color table in Colors module that would allow changing the terminology for all selected items? You could then select all entries and set Tissue / Tissue via the terminology selector only once.

For this use case (creating a completely custom set of terms without a terminology), I would create a CSV file with single tissue entry from Slicer’s standard terminology and edit in Excel the rest of the terms by copy and pasting the fields. It took me less than a minute to convert the other csv file with SCT codes. [terms-and-colors/E15\_Mouse\_Embryo.csv at main · SlicerMorph/terms-and-colors · GitHub](https://github.com/SlicerMorph/terms-and-colors/blob/main/E15_Mouse_Embryo.csv)

It is more of a documentation problem more than anything else.
