class_docstr: Draws a color gradient rectangle along with text labels denoting the value at specific
  points along the gradient.
class_docstr_tok: ["Draws","a","color","gradient","rectangle","along","with","text","labels","denoting","the","value","at","specific","points","along","the","gradient","."]
code: def setIntColorScale(self, minVal, maxVal, *args, **kargs):
      colors = [
          fn.intColor(i, maxVal - minVal, *args, **kargs)
          for i in range(minVal, maxVal)
      ]
      g = QtGui.QLinearGradient()
      for i in range(len(colors)):
          x = float(i) / len(colors)
          g.setColorAt(x, colors[i])
      self.setGradient(g)
      if "labels" not in kargs:
          self.setLabels({str(minVal): 0, str(maxVal): 1})
      else:
          self.setLabels({kargs["labels"][0]: 0, kargs["labels"][1]: 1})
  
file_path: pyqtgraph/pyqtgraph/graphicsItems/GradientLegend.py
imports: from ..None import functions
  from ..Qt import QtCore, QtGui
  from .UIGraphicsItem import UIGraphicsItem
label_desc: Use image node_id 4 for calling the GradientLegend obj's underlying member method code with example usage: obj.setIntColorScale(minVal, maxVal) without return types