# changing the color of one sphere on a vtkContourWidget

**URL:** https://discourse.vtk.org/t/changing-the-color-of-one-sphere-on-a-vtkcontourwidget/2866
**Category:** Support
**Created:** [March 22, 2020, 2:25pm UTC](https://discourse.vtk.org/t/changing-the-color-of-one-sphere-on-a-vtkcontourwidget/2866 "2020-03-22T14:25:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Olicr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/e19b73/32.png) [@Olicr](https://discourse.vtk.org/u/Olicr)
#### Post date: [March 22, 2020, 2:25pm UTC](https://discourse.vtk.org/t/changing-the-color-of-one-sphere-on-a-vtkcontourwidget/2866/1 "2020-03-22T14:25:14Z")

</div>

Hello dear people,

I am trying to change a specific sphere color on a vtkContourWidget.

I have been searching the web before asking you, but couldn(t find any help from there.

The properties I know and that I can change are:

rep.GetLinesProperty().SetColor(1, 0.2, 0)  
rep.GetLinesProperty().SetLineWidth(3.0)  
rep.GetProperty().SetRenderPointsAsSpheres(1)  
rep.GetProperty().SetPointSize(10)  
rep.GetProperty().SetColor(0,1,1)

which defines a reddish contour with a line thickness of 3.0 together with the points represented as spheres which diameters are all equal to 10 (SetPointSize) and all colored with a cyan color (SetColor)

rep is of course derived from the following code snippet:

contourWidget = vtk.vtkContourWidget()  
contourWidget.SetInteractor(inter)  
rep = contourWidget.GetRepresentation()

My question is then: is it possibly, via python, to get the spheres (points) and to locate the one I need, display it with a different color while keeping the others as default or while using a common color?

My python version is 3.7:8 and the version of VTK is 7.2.0 under Win10 if it may be of help.

Thank you in advance,

Best regards,

OC
