<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    As I've said I edited the protocols.py of paraview web:<br>
    <br>
      @exportRpc("pv.pipeline.manager.scalarbar.visibility.update")<br>
        def updateScalarbarVisibility(self, options):<br>
            lutMgr = vtkSMTransferFunctionManager()<br>
            lutMap = {}<br>
            view = self.getView(-1)<br>
            if options:<br>
                for key, lut in options.iteritems():<br>
                    visibility = lut['enabled']<br>
                    if type(lut['name']) == unicode:<br>
                        lut['name'] = str(lut['name'])<br>
                    parts = key.split('_')<br>
                    arrayName = parts[0]<br>
                    numComps = int(parts[1])<br>
    <br>
                    lutProxy = self.getColorTransferFunction(arrayName)<br>
                    barRep =
    servermanager._getPyProxy(lutMgr.GetScalarBarRepresentation(lutProxy,
    view.SMProxy))<br>
    <br>
                    if visibility == 1:<br>
                        barRep.Visibility = 1<br>
    <br>
    #EDIT#<br>
                        barRep.TitleColor=[1.0,0.0,0.0]<br>
                        barRep.LabelColor=[1.0,0.0,0.0]<br>
    <br>
                        barRep.Enabled = 1<br>
                        barRep.Title = arrayName<br>
                        if numComps > 1:<br>
                            barRep.ComponentTitle = 'Magnitude'<br>
                        else:<br>
                            barRep.ComponentTitle = ''<br>
                       
    vtkSMScalarBarWidgetRepresentationProxy.PlaceInView(barRep.SMProxy,
    view.SMProxy)<br>
                    else:<br>
                        barRep.Visibility = 0<br>
                        barRep.Enabled = 0<br>
    <br>
                    lutMap[key] = { 'lutId': lut['name'],<br>
                                            'name': arrayName,<br>
                                            'size': numComps,<br>
                                            'enabled': visibility }<br>
            return lutMap<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 01.05.2017 um 21:03 schrieb Scott
      Wittenburg:<br>
    </div>
    <blockquote
cite="mid:CAPiw4fCQ2Z=zsPKm8gbpnyguF=WwuLwdXfcnjuFDC9ykWbOsPA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Maybe we need to see more context (how you got your
        hands on barRep, and what else you did)?  I just used ParaView
        Qt client to visualize the wavelet, and I changed these colors
        before exporting the state as a python script.  I think the
        following covers what you should need to do:
        <div><br>
        </div>
        <div>from paraview.simple import *</div>
        <div>...</div>
        <div>rv1 = CreateView('RenderView')</div>
        <div>...</div>
        <div>
          <div>lut = GetColorTransferFunction('<wbr>RTData')</div>
          <div>...</div>
          <div>repr = Show(someSrc, rv1)</div>
          <div>repr.LookupTable = lut<br>
          </div>
          <div>...</div>
          <div>repr.<wbr>SetScalarBarVisibility(<wbr>rv1, True)</div>
          <div>...</div>
          <div>lutColorBar = GetScalarBar(lut, rv1)</div>
          <div>lutColorBar.TitleColor = [...]</div>
          <div>lutColorBar.LabelColor = [...]</div>
        </div>
        <div><br>
        </div>
        <div>Then finally maybe a Render() is required?</div>
        <div><br>
        </div>
        <div>If you do all that and the color doesn't change, there may
          be a bug.  Even though the protocols we have now do not allow
          for changing the title and label color (at least not to my
          knowledge), you can manage this all in your application code.
            </div>
        <div><br>
        </div>
        <div>Hope this helps,</div>
        <div>Scott</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, May 1, 2017 at 12:00 PM, Daniel
          Zuidinga <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:info@seoaachen.de" target="_blank">info@seoaachen.de</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
            <br>
            I try to set the color legend font color in protocols.py of
            paraview web visualizer.<br>
            <br>
            def updateScalarbarVisibility(self<wbr>, options):<br>
                ...<br>
               barRep.TitleColor=[0.0,0.0,0.<wbr>0]<br>
               barRep.LabelColor=[0.0,0.0,0.<wbr>0]<br>
            <br>
            but it doesn't change the color. Where can I change it
            (default)? I would also show it as default.<br>
            <br>
            regards<br>
            Daniel<br>
            ______________________________<wbr>_________________<br>
            Powered by <a moz-do-not-send="true"
              href="http://www.kitware.com" rel="noreferrer"
              target="_blank">www.kitware.com</a><br>
            <br>
            Visit other Kitware open-source projects at <a
              moz-do-not-send="true"
              href="http://www.kitware.com/opensource/opensource.html"
              rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
            <br>
            Please keep messages on-topic and check the ParaView Wiki
            at: <a moz-do-not-send="true"
              href="http://paraview.org/Wiki/ParaView" rel="noreferrer"
              target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
            <br>
            Search the list archives at: <a moz-do-not-send="true"
              href="http://markmail.org/search/?q=ParaView"
              rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
            <br>
            Follow this link to subscribe/unsubscribe:<br>
            <a moz-do-not-send="true"
              href="http://public.kitware.com/mailman/listinfo/paraview"
              rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/paraview</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>