Get color from color dialog : ColourDialog « wxPython « Python Tutorial






Get color from color dialog
import wx

app = wx.PySimpleApp()
dialog = wx.ColourDialog(None)
dialog.GetColourData().SetChooseFull(True)
if dialog.ShowModal() == wx.ID_OK:
    data = dialog.GetColourData()
    print 'You selected: %s\n' % str(data.GetColour().Get())
dialog.Destroy()








19.6.ColourDialog
19.6.1.Get color from color dialogGet color from color dialog