def onColorPicker(self):
        """
        Show color-picker dialog to select color.

        Qt will use the native dialog by default.

        """
        dlg = QColorDialog(self)
        if self._color:
            dlg.setCurrentColor(QColor(self._color))

        if dlg.exec():
            self.setColor(dlg.currentColor().name())

        Show color-picker dialog to select color.

        Qt will use the native dialog by default.

        
pyside6/widgets/colorbutton/colorbutton.py