Color
Element type: Dictionary
To fully adopt macOS Dark mode starting from Mojave, you have to give two colors when specifying a custom color.
It’s up to you to check that both colors are consistent in the mode they are destined to. Do note that you can specify the same color for both dark and light mode.
Keys
Name | Type | Required |
---|---|---|
Style | String | Required if DarkMode and LightMode are not specified |
DarkMode | String | Required if Style is not specified |
AlphaDark | Number | |
LightMode | String | Required if Style is not specified |
AlphaLight | Number |
Details
Style
Type: String
Explanation: Let you use a color style defined in the Color styles section. Required if DarkMode
and LightMode
are not specified.
DarkMode
Type: String
Explanation: The dark mode color in hexadecimal code, starting with the # character. Required if Style
is not specified
AlphaDark
Type: Number
Explanation: You can specify here the alpha for the dark mode color, if necessary. Between 0 and 1.
LightMode
Type: String
Explanation: The light mode color in hexadecimal code, starting with the # character. Required if Style
is not specified.
AlphaLight
Type: Number
Explanation: You can specify here the alpha for the light mode color, if necessary. Between 0 and 1.
Single string style
When using a parent style font you don’t want to modify, you can replace all the dictionary with a single string. Just like that:
<key>Color</key>
<string>Main</string>
Alpha
Choose #FF70FA as value to have a pink color, and #438BFF to have a blue one. Note that you can also specify the alpha in the hexadecimal code of the color,
adding two more digits to the string. For example, #FF70FA7F has an alpha of 0.5 since 7F equals 127 (= 255/2) in hexadecimal code.
Example
We define here a color which will be blue for dark mode and brown for light mode. Also, the alpha in the light mode is set to 80%.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>Slides</key>
<array>
<dict>
<key>ContainersBorderColor</key>
<dict>
<key>DarkMode</key>
<string>#5F6796</string>
<key>LightMode</key>
<string>#965741</string>
<key>AlphaLight</key>
<real>0.8</real>
</dict>
</dict>
</array>
<!-- ... -->
</dict>