# Change Color map and add color scale

**URL:** <https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953>\
**Category:** Support\
**Created:** [April 1, 2020, 11:26am UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953 "2020-04-01T11:26:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam1122](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Adam1122](https://discourse.slicer.org/u/Adam1122)\
**Post date:** [April 1, 2020, 11:26am UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/1 "2020-04-01T11:26:10Z")

</div>

Hello all,

I did the post-processing on brain images in 3D Slicer. I changed the color coding to display where MR signals values are higher or lower. I need to add the color bar onto the image in order to easily identify what “blue” or “red” color means. Please, in which program is it possible to change the color map and to add the color bar as well? I didn´t manage to do it in 3D Slicer.

Thanks a lot

Regards

Adam

---

<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:** [April 1, 2020, 2:06pm UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/2 "2020-04-01T14:06:36Z")

</div>

You can do this all in Slicer.

Edit color table: Go to colors module, choose a color node that you would like to modify, click “Copy” button to create an editable copy (the default color nodes are read-only). If you choose a “color table” type of node (this is the most common) then you get hundreds of predefined colors and you can modify each by double-clicking the color swatch in the color column, which can be tedious if you want to make large changes. It may be more convenient to modify “Continuous” color node, such as “RedGreenBlue” because you can specify a few colors at arbitrary levels and the colors are interpolated between them.

Show scalar bar:

- Slice views: go to DataProbe module, check “Enable slice view annotations”, check Scalar bar / Enable
- 3D views: go to Colors module, clone the color table that you use for the volume, set the same min/max range as you have set for your volume, and check Scalar bar / Display scalar bar

---

<div class="post-metadata">

**Author:** ![Adam1122](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Adam1122](https://discourse.slicer.org/u/Adam1122)\
**Post date:** [April 1, 2020, 6:23pm UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/3 "2020-04-01T18:23:51Z")

</div>

I´m working in the Slice view. In the colors module I set the color map and its range. In the colors module I check “Display Scalar bar” and the color range appears but in the 3D views. I would need to add the color scale to the slice views. How can I do it? Moreover, do I have to save separaetely the image and the color range or can one save the image and the color range at the same time?

Thanks a lot  
Regards  
Adam

---

<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:** [April 1, 2020, 7:02pm UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/4 "2020-04-01T19:02:47Z")

</div>

> [@Adam1122](#):
>
> I would need to add the color scale to the slice views. How can I do it?

The details from the above post provide the answer to this see below. You can also read → [Color bar in slice viewers](https://discourse.slicer.org/t/color-bar-in-slice-viewers/6291)

> [@lassoan](#):
>
> Show scalar bar:
> 
> - Slice views: go to DataProbe module, check “Enable slice view annotations”, check Scalar bar / Enable

If you are wanting to create an image for a presentation or something you can use the “Screen Capture” module to generate an image that includes your image + scalar bar .

---

<div class="post-metadata">

**Author:** ![Adam1122](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Adam1122](https://discourse.slicer.org/u/Adam1122)\
**Post date:** [April 2, 2020, 7:15pm UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/5 "2020-04-02T19:15:28Z")

</div>

thanks a lot. In the Colors module I modify the color table but how can I apply it on the image. I´ve just found it in the “Volumes” module. How can I apply my modified color table onto my image?

---

<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:** [April 4, 2020, 8:46pm UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/6 "2020-04-04T20:46:34Z")

</div>

You can create editable versions of built-in lookup tables or color maps in the Colors module. See details [above](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/2).

You can choose which color node is used for displaying a volume in Volumes module.

---

<div class="post-metadata">

**Author:** ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)\
**Post date:** [May 11, 2022, 3:54am UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/7 "2022-05-11T03:54:05Z")

</div>

Hi Andras,  
Is it possibel to change the color scalar bar, colors table?

Also how to get the colour table from a model? and use it to change the colour scalar bar colour table?

Also how to set the foreground and background image using scripting for all the views (red, yellow green)?

thank you

Regards,  
Saima Safdar

---

<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:** [May 11, 2022, 7:47pm UTC](https://discourse.slicer.org/t/change-color-map-and-add-color-scale/10953/8 "2022-05-11T19:47:55Z")

</div>

Color legends has been completely reworked recently in Slicer-4.13. Everything should be simpler and more intuitive and documented here:

[https://slicer.readthedocs.io/en/latest/search.html?q=Legend](https://slicer.readthedocs.io/en/latest/search.html?q=Legend)
