Make NvAPI_Disp_HdrColorControl changes permanent

Because of the very poor support for mixing SDR and HDR content in Windows (and Chrome), I very often have to switch my HDR monitor back and forth between SDR and HDR modes. I’ve been looking for an API to do that programmatically for a while, but I can’t find anything in the Windows APIs.

I just found NVAPI and NvAPI_Disp_HdrColorControl, which lets me do something very similar (the colors are not exactly the same though). However whenever my little command line program quits, the settings revert back to what they were when it started.

Is there a way to make these settings permanent? Otherwise do you know of any Windows API that would let me turn HDR on and off?