wxPython - Change Background colour of Button Last Updated : 18 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we are going to learn about how can we change background colour of a button present in a frame. We use SetBackgroundColour() function to set background colour of the button to some different colour. It takes a wx.Colour class object as an argument. Syntax: wx.Button.SetBackgroundColour(self, colour) Parameters: Parameter Input Type Description colour wx.Colour Colour for the background. Code Example: Python3 1== import wx class Example(wx.Frame): def __init__(self, *args, **kwargs): super(Example, self).__init__(*args, **kwargs) self.InitUI() def InitUI(self): self.locale = wx.Locale(wx.LANGUAGE_ENGLISH) self.pnl = wx.Panel(self) font = wx.Font(10, family = wx.FONTFAMILY_MODERN, style = 0, weight = 90, underline = False, faceName ="", encoding = wx.FONTENCODING_DEFAULT) self.btn = wx.Button(self.pnl, id = 1, label ="Click", pos =(20, 20), size = wx.DefaultSize, name ="statictext") self.btn.SetFont(font) # SET BACKGROUND COLOUR self.btn.SetBackgroundColour((255, 230, 200, 255)) self.SetSize((350, 250)) self.SetTitle('wx.Button') self.Centre() def main(): app = wx.App() ex = Example(None) ex.Show() app.MainLoop() if __name__ == '__main__': main() Output Widow: Comment More infoAdvertise with us Next Article wxPython - Change Background colour of Button R RahulSabharwal Follow Improve Article Tags : Python Python-gui Python-wxPython Python wxPython-Button Practice Tags : python Similar Reads wxPython - Change Background Colour of Radio Button In this article we are going to learn about how can we change background colour of a Radio Button. We will use SetBackgroundColour() function sets the background colour of the window. Notice that as with SetForegroundColour, setting the background colour of a native control may not affect the entire 1 min read wxPython - Change background colour of RadioBox In this article we are going to learn how can we change the background colour of Radio Box present in the frame. In order to do that we are going to use SetBackgroundColour() method. SetBackgroundColour() function takes wx.Colour argument which will be used as background colour for Radio Box. Syntax 1 min read wxPython - Change Foreground Colour of Button In this article we will learn how can we change the foreground colour of the button or the font colour of the button. To do this we will use SetForegroundColour() function associated with wx.Button class of wxPython. SetForegroundColour() function simply takes wx.Colour argument for the foreground. 1 min read wxPython - Change Font colour of Radio Button In this article we are going to learn that how can we change the foreground or font color of the radio button. In order to change the foreground colour of Radio Button we will use SetForegroundColour() function. SetForegroundColour() function sets the foreground colour of the window. The meaning of 2 min read Hex Color for Button Background - Kivy Kivy is a platform-independent GUI tool in Python. It can run on Android, IOS, Linux and Windows, etc. This is the only GUI library from python which can independently run on the android device even we can use it on Raspberry pi also. Â It is an open-source Python library for the rapid development of 1 min read Like