code: def openColorDialog(self):
          
          try:
              currentColor = self.getData()
          except InvalidInputError:
              currentColor = self.cti.data
  
          qColor = QtWidgets.QColorDialog.getColor(currentColor, self)
  
          if qColor.isValid():
              self.setData(qColor)
              self.commitAndClose()
docs: Opens a QColorDialog for the user