9.3. Themes

A Theme encapsulates all of the styling information skEdit uses to draw a text file. The easiest way to manage your themes is via the Colors pref pane. This section describes the file format used for Themes.

skEdit themes are normal OS X property list files, and are stored in ~/Library/Application Support/skHTML/Themes. They can be edited with the "Property List Editor" application that ships with Apple's Developer Tools or with a text editor. For fastest loading, themes should be stored as binary plists. You can convert an XML or textual plist to binary using the plutil command-line application:

plutil -convert binary1 /path/to/file.plist

A theme plist is a dictionary with the following root-level keys. Colors are specified as a 4-part hexadecimal color, like: #rrggbbaa, where aa is used to specify the alpha.

id

A unique identifier for the theme. A reverse domain identifier is preferred. For example, themes that ship with skEdit have identifiers like org.skti.skEdit.themes.NAME.

format-title

A human-readable name for the theme.

global-settings

A dictionary defining the general colors for files. It uses the following self-descriptive keys:

  • background

  • foreground

  • insertion-point

  • invisible

  • selection

styles

An array of dictionaries specifying styles for style identifiers. Each dictionary can have the following keys:

background

Color drawn behind the text.

foreground

The text color.

id

The style identifier.