Set Studio Display/Pro Display XDR reference modes by command?

Does anyone know if there is a way to set the reference mode on Apple monitors by means of a terminal command?

I found an open source tool to set brightness (which it does with an unofficial API, so let’s see if it lasts) but I’d like to be able to set a button on my Stream Deck to toggle between the two modes I use most of the time.