Below is a short snippet to implement a color-picker attached to a button in Qt. Clicking on the button pops up a dialog (native) to select a color. The color is shown by the color of the button face. A right-click option is included to allow clearing of the color setting (returning the value to None).
My book Create Simple GUI Applications with Python & Qt5 has been updated! New chapters on the Model View architecture and custom widgets.