I'm just posting this in case anyone else has come across this issue, as I have multiple times, and only just now figured out the solution to this bug.
It appears that when I open the Preferences window and then press the 'cancel' button to revert any changes, my viewport is suddenly way darker - the colors look wrong. That includes the 3D objects as well as even the background gradient.
What I eventually figured out was that the viewport color management was being toggled OFF by clicking the 'cancel' button in the Preferences window.
You can find this toggle in Preferences>Color Management>'Enable Color Management'
If you've had this problem, then just toggle this back on and hit 'Save'.
I'm using Maya 2020.2 on Windows 7.
I hope this helps anyone experiencing the same problem.