How to get the color of segments from the segmentation node

Hello,

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

Thank you very much.

Try this:

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