Added functionality to read which color it should paint in drawingRect