title: Kivy Fade-In Animation
body: <p>Is there a way to get a fade-in/-out animation on a canvas rectangle background in kivy? I tried it by using the <code>Clock.schedule_interval()</code> function. But several problems occured concerning concurrency and data raise.</p>
  
  <p>One of my tries looks as follows:</p>
  
  <pre><code> def calendarClicked(self, *args):
      self.alpha = 1.0
      self.alphaDelta = 0.01
  
      self.root.canvas.add(Color(1,0,0,self.alpha))
      self.root.canvas.add(Rectangle(size=self.root.size))
  
      def fadeIn(self, dt):
  
          self.alpha -= self.alphaDelta
          self.root.canvas.add(Color(1,0,0,self.alpha))
          self.root.canvas.add(Rectangle(size=self.root.size))
  
          return self.alpha &gt;= 0.5
  
      Clock.schedule_interval(partial(fadeIn, self), 0.1)   
  </code></pre>
  
  <p>Another idea was to use the <code>kivy.animation</code>. But I coudn't find a way to edit the color instead of the position of an object/widget.</p>
  
  <p>Thanks in advance!</p>