Firstly thank you, I have been looking for a way to control the night light and this works a treat.
I use Playnite ( a game launcher to turn off the night light before launching a game and turning it back on afterwards).
Would it be feasible to introduce a command line switch like DisplayTest.exe /on and DisplayTest.exe /off
And if the night light is already in the desired state, just end the program without making any registry changes.
The problem I have with it being a toggle is that I cant guarantee the Night light is on before I launch a game so the result ends up being the opposite of what I need.