class_docstr: **Bases:** :class:`GraphicsObject <pyqtgraph.GraphicsObject>`
class_docstr_tok: ["*","*","Bases",":","*","*",":","class",":","`","GraphicsObject","<","pyqtgraph.GraphicsObject",">","`"]
docstr: Sets color-scaling levels for the mesh. 
  
  Parameters
  ----------
      levels: tuple
          ``(low, high)`` 
          sets the range for which values can be represented in the colormap.
      update: bool, optional
          Controls if mesh immediately updates to reflect the new color levels.
docstr_tok: ["Sets","color-scaling","levels","for","the","mesh",".","Parameters","--","--","--","--","--","levels",":","tuple","``","(","low",",","high",")","``","sets","the","range","for","which","values","can","be","represented","in","the","colormap",".","update",":","bool",",","optional","Controls","if","mesh","immediately","updates","to","reflect","the","new","color","levels","."]
code: def setLevels(self, levels, update=True):
      """
      Sets color-scaling levels for the mesh.
  
      Parameters
      ----------
          levels: tuple
              ``(low, high)``
              sets the range for which values can be represented in the colormap.
          update: bool, optional
              Controls if mesh immediately updates to reflect the new color levels.
      """
      self.levels = levels
      self.sigLevelsChanged.emit(levels)
      if update:
          self._rerender(autoLevels=False)
          self.update()
  
imports: import numpy
  from ..None import Qt, colormap
  from ..None import functions
  from ..Qt import QtCore, QtGui
  from .GraphicsObject import GraphicsObject
label_desc: Use image node_id 6 for calling the PColorMeshItem obj's underlying member method code with example usage: obj.setLevels(levels, update) without return types