Function to draw a rectangle of a given color on the screen surface.