Color Styles
Key name: ColorStyles
Element type: Dictionnary
Status: Optional
You can define here custom colors which will be available in any place you can use colors. To use a font configuration defined here, you just need to add the key Style
in the font configuration dictionary, and to give as value the name of the key. A color can have a style and implement other properties, like setting the alpha.
If a color uses a style but also specify properties which exist in the style, the properties in the style will be overridden.
To use styles in a colors elsewhere in the plist, simply set the key Style
to the name of the style you want to use.
You can define default colors that will be used in Octory by default when no other color is specified.
Keys
Name | Type | Required |
---|---|---|
DefaultBorder | Dictionary (Color) |
Detail
DefaultBorder
Type: Dictionary of Color
Explanation: Specify a color for Octory to use it by default for all borders.
Example
We defined here two colors: "Main" and "Secondary".
<?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>ColorStyles</key>
<dict>
<key>Main</key>
<dict>
<key>DarkMode</key>
<string>#819ABE</string>
<key>LightMode</key>
<string>#ED682580</string>
</dict>
<key>Secondary</key>
<dict>
<key>DarkMode</key>
<string>#000000</string>
<key>LightMode</key>
<string>#50607F</string>
</dict>
</dict>
<!-- ... -->
</dict>
</plist>
You can use a color style to define another color style. Here we define a "Main" color and a "LighterMain" color which uses "Main" but changes its alpha to 0.7.
If you specify a style A for a font that is already used as a style B in the style A, Octory will ignore one of the style to avoid infinite loops.
<?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>ColorStyles</key>
<dict>
<key>Main</key>
<dict>
<key>DarkMode</key>
<string>#819ABE</string>
<key>LightMode</key>
<string>#ED682580</string>
</dict>
<key>LighterMain</key>
<dict>
<key>Style</key>
<string>Main</string>
<key>Alpha</key>
<Real>0.7</real>
</dict>
</dict>
<!-- ... -->
</dict>
</plist>