Too broad a question
that cause babys to turn blue are the right to left shunts tha lets blood bypass the lungs and doesnt get oxygenated.
The person looks blue called cyanosis. Tettrology of fallot, transposition of great vessels , vsd with flow reversal called esinmengers syndrome. Are a few of such conditions.