Opened test

Gracie • Married 💍, pregnant with baby #2, due September! Gods timing is perfect!

I’m just curious, I see it on here a lot but why do pregnancy test become invalid once opened, is it just red dye, just blue, just digital or all?