# Change MarkupsCurve color programmatically

**URL:** <https://discourse.slicer.org/t/change-markupscurve-color-programmatically/11978>\
**Category:** Development\
**Tags:** markups, color\
**Created:** [June 10, 2020, 10:49am UTC](https://discourse.slicer.org/t/change-markupscurve-color-programmatically/11978 "2020-06-10T10:49:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [June 10, 2020, 10:49am UTC](https://discourse.slicer.org/t/change-markupscurve-color-programmatically/11978/1 "2020-06-10T10:49:52Z")

</div>

Hello.

I’m trying to change the color of curve markups programmatically. The following snippet does not seem to work (color remains unchanged) and does not produce any error:

```auto
markupNode = getNode('MarkupsCurve')
displayNode = markupNode.GetDisplayNode()
displayNode.SetColor([0,0,0])

```

From the UI I can see that colors are managed through terminologies. Does this means that setting the color from the display node does not apply to this case? Any example on how to use terminologies in this context?

Thank you in advance.

Rafael.

---

<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:** [June 10, 2020, 12:45pm UTC](https://discourse.slicer.org/t/change-markupscurve-color-programmatically/11978/2 "2020-06-10T12:45:05Z")

</div>

Markups have `Color` and `SelectedColor` properties. `SelectedColor` is used if all control points are in “selected” state, which is the default. So, in most cases you want to use `SetSelectedColor`.

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [June 10, 2020, 3:55pm UTC](https://discourse.slicer.org/t/change-markupscurve-color-programmatically/11978/3 "2020-06-10T15:55:42Z")

</div>

Thank you @lassoan, that solves the problem!
