Set background color to match default mesh color

I try to render animation which contains a plane with moving mesh objects on top of it. Currently, the camera can see the background which results in color difference between the plane and the background. How can I make the background color to match the plane default color? How can I do that using script?