To automatically extend the background of the sidebar to match the content, you need to have the “Plus” Plugin, and use the “flow color to the bottom” option at the bottom of Main Options > Sidebar & Layout > Sidebar Layout.
Then you put your background on the Sidebar widget Area that you use (primary or secondary)
You will have to check the Flow color to bottom option – that is all. You might end up adjusting the bg color of the sidebars to set an optimal color for the flow.