Color Themes

Script Debugger has long allowed you to set more than just the formatting of AppleScript code in its editor: you also have control over things like the background color, selection color, insertion line highlight, and more. It also gives control over text formatting in other areas, such as inspectors. Script Debugger 8 takes this a step further, with support for Dark Mode and Color Themes.

Color Themes record a snapshot of all the color and formatting information, and extends it to apply to dictionary views. Changing themes is as simple as choosing one from the Color Themes submenu of the View menu.

Default Dark Mode

Script Debugger 8 has four built-in themes: Default Light, Default Dark, Fixed Width Light, and Fixed Width Dark. The first time you run it, a custom theme, called My Snapshot, will be created, based on your existing settings and defaults. The built-in themes cannot be edited, but you can duplicate them to create new, editable custom themes. And of course the My Snapshot theme can be modified, duplicated and renamed.

To create or modify a theme, go to Preferences and choose the Fonts & Colors panel. At the top you will see a new menu, labelled Active Theme. This lists all available themes, the same as the Color Themes submenu in the View menu. The four built-in themes are at the top, followed by any themes you have created. If you choose one of the built-in themes, editing of formats and colors will be disabled; otherwise you can change any of the settings to suit.

When you experiment with a theme, changes you make will appear immediately. The Discard Changes button will be enabled, so you can undo any changes you make — otherwise they will be saved when you change to another theme, close the panel, or quit Script Debugger.

The Factory Defaults button sets the active theme to all default values (which match Default Light).

To the right of the Active Theme menu is an action button that pops up another menu, with three commands: Duplicate…, Rename… and Delete…. You you use this to duplicate any theme, including built-in themes, or to rename or delete custom themes. In this way you can create as many themes as you wish.

My Snapshot

Themes whose name ends with ” Dark” or ” Light” have a special behavior. Let’s say you have themes named “My Theme Light” and “My Theme Dark”, and you have the light version active. If you switch your system to Dark Mode, Script Debugger will automatically change themes from “My Theme Light” to “My Theme Dark”. Similarly, it will change back if you change your system to Light Mode. The only requirement is that the pair of theme names be otherwise identical.

Themes also contain Dictionary View settings. If you click on the Harmonized checkbox, dictionary display will be harmonized in terms of background and text color. The background view in the Dictionary display will match that set for the editor, and the two popup menus let you specify which AppleScript format colors should be used for the main text and lighter text.

Custom themes are saved as individual files in your Library folder, at the path ~/Library/Application Support/Script Debugger 8/User Themes/. The files have an extension of .sdcolortheme, and you can move them between computers.

Note that apart from the first time you run Script Debugger 8, when the My Snapshot theme is created, the standard AppleScript formats shared by other editors are ignored. So changing you formats in Script Debugger 8 will not change those used in other applications, such as Script Editor, and vice versa.