# How to get the color of segments from the segmentation node

**URL:** <https://discourse.slicer.org/t/how-to-get-the-color-of-segments-from-the-segmentation-node/11356>\
**Category:** Support\
**Created:** [April 29, 2020, 11:33pm UTC](https://discourse.slicer.org/t/how-to-get-the-color-of-segments-from-the-segmentation-node/11356 "2020-04-29T23:33:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xlucox](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/xlucox/32/6381_2.png) [@xlucox](https://discourse.slicer.org/u/xlucox)\
**Post date:** [April 29, 2020, 11:33pm UTC](https://discourse.slicer.org/t/how-to-get-the-color-of-segments-from-the-segmentation-node/11356/1 "2020-04-29T23:33:01Z")

</div>

Hello,

I wonder how can I get the colors of the segments which belong to a segmentation node.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [April 30, 2020, 12:38am UTC](https://discourse.slicer.org/t/how-to-get-the-color-of-segments-from-the-segmentation-node/11356/2 "2020-04-30T00:38:43Z")

</div>

Try this:

```auto
segmentationNode = getNode("Segmentation")
segment = segmentationNode.GetSegmentation().GetSegment("Segment_1")
segment.GetColor()

```
