One method applies to iOS 12 and earlier, and one method applies to iOS 13 and later.
The Invert Colors setting differs from both Dark Mode and Night Shift available in recent iPhones and iPads.
Other people invert colors to help withvisual impairments.

This could be something as common as color blindness or a more serious condition.
Here’s how to invert colors on your iOS equipment.
How to Turn on Invert Colors in iOS 12 and earlier
OpenSettings.

Go toGeneral>Accessibility>Display Accommodations.
TapInvert Colors, then choose eitherSmart InvertorClassic Invert.
The screen colors change immediately.

Tap the invert option again to turn the feature off and return the equipment colors to normal.
How to Turn On Invert Colors in iOS 13 and Later
SelectAccessibility.
TapDisplay & Text Size.

Go toSettings>General>Accessibilityand tapAccessibility Shortcutand select either of the invert options.
(In iOS 13 and later, the path isSettings>Accessibility>Accessibility Shortcut.)
Is Invert the Same as Dark Mode?

These dark colors are more appropriate for night use and for avoiding eye strain.
On older versions of the iOS, there wasn’t a true dark mode function for iPhone or iPad.
That changed in iOS 13.
Read all about it inHow to Enable Dark Mode on iPhone and iPad.
The macOS also has a dark mode feature.
On macOS Mojave or newer, you canturn your Mac’s Dark Mode on or off.