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.
pod "Palette"
let palette = Palette(background:self.view, forView:self.label)
self.label.textColor = palette.getContrastingColor()
or
self.label.textColor = Palette.getContrastingColor(self.view, forView: self.label)
Palette * palette = [[Palette alloc] initWithBackground:self.view forView:label];
label.textColor = [palette getContrastingColor];
or
label.textColor = [Palette getContrastingColor:self.view forView:label];