CocoaPods trunk is moving to be read-only. Read more on the blog, there are 16 months to go.

Palette 1.0.1

Palette 1.0.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jul 2015
SPMSupports SPM

Maintained by Carlos Simon.




Palette 1.0.1

Palette-iOS

Like Android Palette for iOS. Written in Swift and compatible with Objective-C From any view (anything that inherits UIView) gets contrasting color (black or white) for specific point where is another view.

Screenshots

palette ios example palette ios example palette ios example

How to install

How to use

In Swift

let palette = Palette(background:self.view, view:self.label)
self.label.textColor = palette.getContrastingColor()

or

self.label.textColor = Palette.getContrastingColor(self.view, forView: self.label)

In Objective-C

Palette * palette = [[Palette alloc] initWithBackground:self.view forView:label];
label.textColor =  [palette getContrastingColor];

or

label.textColor = [Palette getContrastingColor:self.view forView:label];