How can I change the line colour in vtkResliceCursorWidget and vtkLineWidget ?

How can I change the colour of the line in vtkLineWidget ?
How can I change the colour of the lines in vtkResliceCursorWidget ?
Screenshot_20220202_120706

Screenshot_20220202_120352

Look at vtkLineWidget, in particular, GetLineProperty()
vtkProperty will let you change the line colour. You can also change the ball colour, see GetHandleProperty().

I don’t think you can change cursor colours in vtkResliceCursorWidget.

Does not work in vtk.js
lineWidget.GetLineProperty is not a function