To change background color you have to use a professional service like PhotoAiD which removes background and makes it uniformly the right color. It works under the official requirements to give you a correct and acceptable 30 x 40 mm photograph.