We can present the color picker in swiftUI easily.
ColorPicker("", selection: $selectedColor)
However, in my macOS app it looks ridiculous as it opens as a standalone view and is disconnected from the app.
What I would like to achieve is by tapping a button, color picker opens in popover, the same way as it opens in the Preview app.