title: How to change background colour in Kivy
body: <p>I need a bit of a hand with a program I'm trying to code using kivy and python 3, however I'm relatively new to both.
  What I need in my program is to setup two different background colours, that the user can switch between (a night mode, and one to use in daylight) </p>
  
  <pre><code>#globalvariable
  backgroundcolour = [50, 50, 50]
  
  class MainScreen(Screen):
  
      rgb = StringProperty()
      rgb = backgroundcolour
  
      def changebackground(self):
          self.canvas.clear()
          backgroundcolour = [55, 5, 99]
          print("DONE")
  </code></pre>
  
  <p>Kivy file:</p>
  
  <pre><code>&lt;MainScreen&gt;:
      name: 'main'
      canvas:
          Color: 
              rgb: root.rgb
  </code></pre>
  
  <p>However all I get after I run the changebackground subroutine, my kivy window just replaces itself with a blank black screen.
  I presume what I'm doing wrong is I'm not refreshing the window, or something, but I've got no idea how to go about doing that.]</p>
  
  <p>Many thanks</p>