-
Notifications
You must be signed in to change notification settings - Fork 17
Tint Colors
Anemone allows changing the tint color of the UI. On iOS 7 and higher, a lot of the UI is based on the tint colors that are set. Anemone allows changing the tint of views and allows targeting specific views or just enabling it for everything.
Tint Color settings, just like images, stack up as themes are enabled so you can feel free to include multiple sub-themes that have different tint color settings and they'll add up.
JunesiPhone has made an online tool to help themers use this feature. Link
Key: "TintFilter"
Type: Dictionary
Anemone allows targeting which apps to load or not load the tint settings in.
Note: You must have tint filter settings, even a blank filter, or your tint settings will not be loaded.
Key: "policy"
Type: String
Default: blacklist
The tint policy specifies whether Tints should be allowed on a whitelist or blacklist basis. Set to "whitelist" to whitelist individual apps.
Key: "BundleIdentifiers" Type: Array
An array of bundle id's to whitelist or blacklist based on the tint policy setting.
Key: "TintColors" Type: Dictionary
A dictionary with the values as CSS-compatible color strings to specify the color to tint each view. The key is the class or superclass of the desired UIView type to change. Example classes are listed below.
Note: More specific class definitions override less-specific class definitions, regardless of theme ordering.
Important Note regarding UIImageView's and UIImageView subclasses: to avoid tinting issues, tinting UIImageView subclasses directly has been disabled while we investigate a bug with it. For now, please tint the UIImageView's superview and the UIImageView should inherit the tint correctly.
Class | Description |
---|---|
UIView | Tint /everything/. May be easily overridden though. |
Global | An alias for UIView |
UITableView | Table Views (E.g. Settings Panels) |
UISwitch | Toggle Switches |
UISwitchThumb | An alias for the thumb of toggle switches. |
UISegmentedControl | The frame of segmented buttons |
UISegment | Segmented Buttons |
UINavigationBar | Navigation Bars |
UIToolbar | Toolbars |
UISlider | Sliders |
UIStatusBar | Status Bars |
UIButton | Buttons |
UITextField | Text Fields |
To theme status bar items: look for items here that end in "ItemView" and begin with "UIStatusBar": https://github.com/nst/iOS-Runtime-Headers/tree/master/Frameworks/UIKit.framework
(example: UIStatusBarHomeItemView.h). For the key to use for Anemone, remove ".h" from the end and use that as your key. (e.g. UIStatusBarHomeItemView)
An example plist for changing the tint colors is available here:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="1.0">
<dict>
<key>TintFilter</key>
<dict>
<key>policy</key>
<string>blacklist</string>
<key>BundleIdentifiers</key>
<array />
</dict>
<key>TintColors</key>
<dict>
<key>UIToolbar</key>
<string>red</string>
<key>UINavigationBar</key>
<string>blue</string>
<key>UISwitch</key>
<string>purple</string>
</dict>
</dict>
</plist>
Another example which also uses Override Colors is available here:
<?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>ColorFilter</key>
<dict>
<key>BundleIdentifiers</key>
<array>
<string>com.apple.Preferences</string>
</array>
<key>policy</key>
<string>whitelist</string>
</dict>
<key>OverrideColors</key>
<dict>
<key>BarBackgroundColor</key>
<string>black</string>
<key>TableCellBackground</key>
<string>#424242</string>
<key>TableCellSelectionBackground</key>
<string>#757575</string>
<key>TableBackground</key>
<string>#212121</string>
<key>DarkTextColor</key>
<string>#FAFAFA</string>
<key>BlackColor</key>
<string>white</string>
</dict>
<key>TintColors</key>
<dict>
<key>Global</key>
<string>#00E5FF</string>
</dict>
<key>TintFilter</key>
<dict>
<key>BundleIdentifiers</key>
<array>
<string>com.apple.Preferences</string>
</array>
<key>policy</key>
<string>whitelist</string>
</dict>
</dict>
</plist>
Another example which tints status bar item colors is available here:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="1.0">
<dict>
<key>TintFilter</key>
<dict>
<key>policy</key>
<string>blacklist</string>
<key>BundleIdentifiers</key>
<array />
</dict>
<key>TintColors</key>
<dict>
<key>UIStatusBar</key>
<string>green</string>
<key>UIStatusBarSignalStrengthItemView</key>
<string>gray</string>
<key>UIStatusBarServiceItemView</key>
<string>gray</string>
<key>UIStatusBarItemView</key>
<string>green</string>
<key>UIStatusBarAirplaneModeItemView</key>
<string>rgb(0,255,255)</string>
<key>UIStatusBarDataNetworkItemView</key>
<string>pink</string>
<key>UIStatusBarActivityItemView</key>
<string>red</string>
<key>UIStatusBarTimeItemView</key>
<string>orange</string>
<key>UIStatusBarBluetoothItemView</key>
<string>blue</string>
<key>UIStatusBarBatteryItemView</key>
<string>purple</string>
<key>UIStatusBarBatteryPercentItemView</key>
<string>purple</string>
</dict>
</dict>
</plist>