Toggle HDR on/off on macOS Ventura+
This AppleScript switches the HDR mode.
To switch from the command line - you can use $ osascript HDR-toggle.applescript
or generate the application from the Script Editor.
To toggle via hotkey - run this script as Workflow/Quick Action and assign the desired button.