Grabs the dominant color or a representative color palette from an image. A Swift port of Sven Woltmann's Java implementation.
To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 8
- Swift 2
- Swift 3 version will be available soon!
ColorThiefSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ColorThiefSwift"
# Support Swift 2 only for now
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3'
end
end
end
Kazuki Ohara [email protected]
ColorThiefSwift is available under the MIT license. See the LICENSE file for more info.
- Sven Woltmann - for the Java Implementation. ColorThiefSwift is a port of this.
- https://github.com/SvenWoltmann/color-thief-java
- Lokesh Dhakar - for the original JavaScript version.
- http://lokeshdhakar.com/projects/color-thief/
- https://github.com/lokesh/color-thief/