Question: why does pnp turn yellow?
Answer: A lone pair from the oxygen can be delocalized via conjugation to the benzene ring and nitro group. Since the length of conjugated systems affects the color of organic compounds, this ionization change causes the 4-nitrophenol to turn yellow when fully deprotonated and existing as 4-nitrophenolate.