This AppleScript allows you to automate the toggling of using HDR of a display on MacOS. Useful when switching between watching HDR content (youtube, apple tv) to using regular applications.
Essentially it does the job one would have to do manually: Open System Preferences, go to Displays, click "High Dynamic Range".
Tested with:
- MacOS Ventura (13.4.1(c)) August 2023
- On your mac, open Script Editor
- Copy / paste the contents of
Toggle Display HDR.scpt
- File Save / Hold option: File, Save As
- Save the script as an application:
- Choose filename (e.g. "Toggle Display HDR")
- File format: Application
- Save to Applications Folder
- Double click from the applications folder
- Enable the script to be run by going into System Preferences, Security & Privacy, unlocking the dialogue box, then selecting (usually in Accessibility)
Toggle Display HDR
and whatever else it needs to run.
For me, the easiest method I've found is to use cmd
+ space
to search for "Toggle Display HDR" and run it from there, or drag the application to the dock and click to trigger it.