import wx class MainFrame(wx.Frame): def __init__(self, parent): super(MainFrame, self).__init__(parent) button = wx.Button(self, label="Mehet") button.Bind(wx.EVT_BUTTON, self.on_click_button) def on_click_button(self, event): print('vmi') cd = wx.ColourDialog(self) cd.ShowModal() colourData = cd.GetColourData() print(colourData.GetColour().Get()) class ValamiApp(wx.App): def OnInit(self): frame = MainFrame(None) frame.Show() return True app=ValamiApp() app.MainLoop()