It is likely that Command-Option-Control-8 was accidentally pressed, which reverses colors. Press that key combo again to toggle it back to normal or, if you prefer, open System Preferences
> Universal Access
. When you are in that Universal Access preference pane, select the radio button that says Black on White
; this will get things back to normal.
If this tends to happen frequently and the switching of the setting becomes an annoyance, you can disable it by going to System Preferences
> Keyboard & Mouse
> Keyboard Shortcuts
.Written by jchuzi with contributions from dianne in Switching to black on white display.
(Note: you must be logged in to read the development thread.)