Go to Settings -> Accessibility and look for "Color inversion" or something similar to that, then shut it off. It may be in the Display settings instead.
Some phones are set up to enable this mode at specific times of day, and it can also be triggered from a notification area shortcut widget.