Q:

Kivy - First Widget of Class not getting color

I have some simple code below that is just creating some rectangles with a color assigned to them, and then storing them into a FloatLayout. For some reason, the very first rectangle 'Brick' that I create, doesnt get a color, but all subsequent ones do. I have issues with my game also where when another widget collides with a brick, it updates the attributes of the brick to its left, and not itself. I think the two issues are related. 
What is going on with the first instance of Brick (brick1) that is being added to the FloatLayout that it doesnt get the color created?

import kivy
kivy.require('1.10.0')

from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.core.window import Window
from kivy.properties import NumericProperty, ReferenceListProperty
from kivy.clock import Clock
from kivy.graphics import Rectangle, Ellipse, Color
from kivy.uix.floatlayout import FloatLayout
from kivy.vector import Vector
from kivy.utils import get_color_from_hex
import random
from kivy.config import Config

Window.size = (300,600)

class Brick(Widget):

    def __init__(self, xloc, yloc, **kwargs):
        super().__init__(**kwargs)
        with self.canvas:
            self.size = (25,25)
            self.x = xloc
            self.y = yloc
            self.pos = (self.x,self.y)
            self.body = Rectangle(pos=self.pos,size = self.size)
            self.c = Color(1,0,1)

class Game(Widget):

    def __init__(self,**kwargs):
        super().__init__(**kwargs)

        self.brick_container = FloatLayout(size = (25,25))

        brick1 = Brick(50,100)
        brick2 = Brick(100,100)
        self.brick_container.add_widget(brick1)
        self.brick_container.add_widget(brick2)

        self.add_widget(self.brick_container)

    def update(self,dt):
        self.name = 'nothing'

class MyApp(App):
    def build(self):
        game = Game()
        Clock.schedule_interval(game.update, 1.0/60.0)
        return game

if __name__ == '__main__':
    MyApp().run()

A:

You have to set the color first and then the rectangle
class Brick(Widget):
    def __init__(self, xloc, yloc, **kwargs):
        super().__init__(**kwargs)
        self.size = (25,25)
        self.pos = (xloc , yloc)
        with self.canvas:
            self.c = Color(1,0,1)
            self.body = Rectangle(pos=self.pos,size = self.size)

According to the docs when using a Drawing Instruction, use the color set above.

Drawing instructions 
Drawing instructions range from very simple
  ones, like drawing a line or a polygon, to more complex ones, like
  meshes or bezier curves:
with self.canvas:   
    # draw a line using the default color    
    Line(points=(x1, y1, x2, y2, x3, y3))

    # lets draw a semi-transparent red square   
    Color(1, 0, 0, .5, mode='rgba')    
    Rectangle(pos=self.pos, size=self.size)

For that reason in your original code the first Brick used the color by default(white), and the others if they had the correct color.

