If all the colors on your screen are suddenly inverted or black and white, you might have pressed Control-Option-Command-8, which is a Mac accessibility shortcut for inverting the screen colors.
You can control this feature in Accessibility preferences:
- Choose Apple menu () > System Preferences, then click Accessibility.
- In the Display section, deselect "Invert colors" or "Use grayscale."