Trying to create a method to colour a specific pixel.
Moving colour code calculation into a separate method seems to have
worked.