Python | Set Background Template in kivy Last Updated : 12 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktop applications. Setting a good background template is a good thing to make your app look more attractive to the user. For inserting a background template in your App some modifications need to be done in the .kv file. Below is the code to set a background template for your app. .Py file Python3 1== # Program to create a background template for the App # import necessary modules from kivy from kivy.uix.boxlayout import BoxLayout from kivy.app import App # create a background class which inherits the boxlayout class class Background(BoxLayout): def __init__(self, **kwargs): super().__init__(**kwargs) pass # Create App class with name of your app class SampleApp(App): # return the Window having the background template. def build(self): return Background() # run app in the main function if __name__ == '__main__': SampleApp().run() .kv file Python3 1== <Background>: id: main_win orientation: "vertical" spacing: 10 space_x: self.size[0]/3 canvas.before: Color: rgba: (1, 1, 1, 1) Rectangle: source:'back.jfif' size: root.width, root.height pos: self.pos Button: text: "Click Me" pos_hint :{'center_x':0.2, 'center_y':0.2} size_hint: .30, 0 background_color: (0.06, .36, .4, .675) font_size: 40 Output: Comment More infoAdvertise with us Next Article Python | Accordion in kivy K KaranGupta5 Follow Improve Article Tags : Python Python-gui Python-kivy Practice Tags : python Similar Reads Python | Accordion in kivy Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications. Kivy Tutorial - Learn Kivy with Examples. Accordion: The Accordi 3 min read Python | BoxLayout widget in Kivy Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications. ???????? Kivy Tutorial - Learn Kivy with Examples. Now in this 5 min read Python | Creating a Simple Drawing App in kivy Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktop applications. Kivy Tutorial - Learn Kivy with Examples. Drawing App: In this w 4 min read Python | Checkbox widget in Kivy Kivy is a platform independent GUI tool in Python. Kivy applications can be run on Android, IOS, linux, and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktop applications. Kivy Tutorial - Learn Kivy with Examples. Checkbox 4 min read Python | StackLayout in Kivy Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications. ???????? Kivy Tutorial - Learn Kivy with Examples.  StackLayou 3 min read Python| AnchorLayout in Kivy Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications. 👉🏽 Kivy Tutorial - Learn Kivy with Examples. Anc 3 min read Like