[Paraview] change text color in python script

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Apr 8 14:15:15 EDT 2015


> i am working on a script that makes screenshots. I need to use a white
> background and therefore i want to change the font color of the color legend
> to black. I have tried to get the necesarry commands via the trace function
> but i have not seen any command that would help me.

Which version of ParaView are you using? With 4.3.1, I get the following:

<snip>

# get color transfer function/color map for 'RTData'
rTDataLUT = GetColorTransferFunction('RTData')

# get color legend/bar for rTDataLUT in view renderView1
rTDataLUTColorBar = GetScalarBar(rTDataLUT, renderView1)

# Properties modified on rTDataLUTColorBar
rTDataLUTColorBar.TitleColor = [0.0, 0.0, 0.0]
rTDataLUTColorBar.LabelColor = [0.0, 0.0, 0.0]


More information about the ParaView mailing list