Background color is checked just as strictly as photo size, and a shadow or the wrong shade is a common cause of rejection.
A plain, even background lets facial recognition software used by immigration systems isolate the face cleanly from the surroundings. Patterns, shadows or furniture in the background can interfere with this and lead to a photo being rejected even if the size is correct.
Plain white is the most common requirement, used by Pakistan, India, the USA, the UAE, Oman and Saudi Arabia among many others. It gives the strongest contrast against most skin tones and hair colors.
The United Kingdom and most Schengen (European Union) countries ask for a light grey background instead of pure white, since it is considered easier to separate from pale clothing in automated checks.
China and the Philippines are examples of countries that use a light blue background for passport and visa photos, a convention that also appears in some ID card formats across Asia.
Achieving a clean, even background at home usually means standing against a plain wall in good light, then letting a tool apply the exact official background behind the cropped photo rather than trying to match the color with a physical backdrop. Upass applies the correct background automatically for the country you select.