...the technique you refer to is known as keying...
...as long as the object has good contrast to its background it can be any color really, for example, a photo of a blue cup on a similar blue background would make it difficult to extract, a white background would better...
...it all depends on the subject, generally i would keep my objects on as white a background as available, even if it is just a sheet of paper to hand...
andrew