class_docstr: **Bases:** QtWidgets.QPushButton
  
  Button displaying a color and allowing the user to select a new color.
  
  ====================== ============================================================
  **Signals:**
  sigColorChanging(self) emitted whenever a new color is picked in the color dialog
  sigColorChanged(self)  emitted when the selected color is accepted (user clicks OK)
  ====================== ============================================================
class_docstr_tok: ["*","*","Bases",":","*","*","QtWidgets.QPushButton","Button","displaying","a","color","and","allowing","the","user","to","select","a","new","color",".","======================","============================================================","*","*","Signals",":","*","*","sigColorChanging","(","self",")","emitted","whenever","a","new","color","is","picked","in","the","color","dialog","sigColorChanged","(","self",")","emitted","when","the","selected","color","is","accepted","(","user","clicks","OK",")","======================","============================================================"]
code: def __init__(self, parent=None, color=(128, 128, 128), padding=6):
      QtWidgets.QPushButton.__init__(self, parent)
      self.padding = (
          (padding, padding, -padding, -padding)
          if isinstance(padding, (int, float))
          else padding
      )
      self.setColor(color)
      self.colorDialog = QtWidgets.QColorDialog()
      self.colorDialog.setOption(
          QtWidgets.QColorDialog.ColorDialogOption.ShowAlphaChannel,
          True,
      )
      self.colorDialog.setOption(
          QtWidgets.QColorDialog.ColorDialogOption.DontUseNativeDialog,
          True,
      )
      self.colorDialog.currentColorChanged.connect(
          self.dialogColorChanged
      )
      self.colorDialog.rejected.connect(self.colorRejected)
      self.colorDialog.colorSelected.connect(self.colorSelected)
      # QtCore.QObject.connect(self.colorDialog, QtCore.SIGNAL('currentColorChanged(const QColor&)'), self.currentColorChanged)
      # QtCore.QObject.connect(self.colorDialog, QtCore.SIGNAL('rejected()'), self.currentColorRejected)
      self.clicked.connect(self.selectColor)
      self.setMinimumHeight(15)
      self.setMinimumWidth(15)
  
file_path: pyqtgraph/pyqtgraph/widgets/ColorButton.py
imports: from ..None import functions
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 1 to create a new ColorButton object from inherited base classes: QtWidgets with example: obj = ColorButton(parent, color, padding)