Background color in Cycles

I would like to render an object without a background. So I need a single uniform color that is as simple to select and fill with a background color as a webcolor. How can I do this? I would like to know how to do this with both Blender Internal and Cycles. Can someone help me with this?

For transparent backgrounds
Set to an output format that can use an alpha channel such as .png and set to RGBA
In cycles in the Render / Film panel select Transparent tickbox