在一个给定的UIImage快速查找认为最相关的颜色:SOZOChromoplast
jopen
10年前
功能类似于iTunes的相册视图,SOZOChromoplast能够在一个给定的UIImage快速查找认为最相关的颜色。每次给你完美的配色方案。
Installing via Cocoapods
Add the following line to your Podfile and run pod install
pod 'SOZOChromoplast'
Usage
Simple!
// Get an image UIImage *someImage = [UIImage imageNamed:@"someImage.png"]; // Instantiate your chromoplast SOZOChromoplast *chromoplast = [[SOZOChromoplast alloc] initWithImage:someImage]; // Use your colors! self.view.backgroundColor = chromoplast.dominantColor; self.label1.textColor = chromoplast.firstHighlight; self.label2.textColor = chromoplast.secondHighlight;