https://github.com/octree/swiftythemekit
ThemeKit in Swift
https://github.com/octree/swiftythemekit
color ios nightmode scheme style swift
Last synced: 8 months ago
JSON representation
ThemeKit in Swift
- Host: GitHub
- URL: https://github.com/octree/swiftythemekit
- Owner: octree
- License: mit
- Created: 2018-08-13T10:05:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-28T13:44:36.000Z (about 7 years ago)
- Last Synced: 2025-10-13T04:38:06.935Z (8 months ago)
- Topics: color, ios, nightmode, scheme, style, swift
- Language: Swift
- Size: 8.16 MB
- Stars: 4
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftyThemeKit
[](https://github.com/Carthage/Carthage)
[](https://img.shields.io/cocoapods/v/SwiftyThemeKit.svg)

自动产生配色方案,一键切换夜间模式。
配色是参考的 [colorless.app](https://colorless.app/)
## Shot

## Usage
```swift
// 设置主题色和样式
// color: 主题色
// style:light、dark、night
ThemeManager.shared.changeTheme(with: color, style: style)
// bind
navigationController?.navigationBar.tk.barTintColor = \Theme.background.bar
label.tk.textColor = \Theme.text.primary
view.tk.backgroundColor = \Theme.background.primary
// 切换主题, view 会自动更新
ThemeManager.shared.changeTheme(with: anotherColor, style: .night)
```
## Installation
### carthage
```
github "octree/SwiftyThemeKit" ~> 1.0.0
```
### CocoaPods
```
pod 'SwiftyThemeKit', '~> 1.0.0'
```
## License
ThemeKit is released under the MIT license. See LICENSE for details.