Get into settings, find build number , usually in the about section. Double click on it 5 times ( ten clicks ) fast.
Should unlock developer options. Go back, find developer menu, see if there's an inverted colours option in there.
I don't know why it would trigger by itself. That's if it's a software issue
Did you reboot device and/or try different hdmi.
Try a factory reset and if it does nothing it’s most likely a hardware issue
Should see in the developer settings of the tv. In the display section.