Home

Awesome

LEColorPicker

A Cocoa-Touch system for getting a color scheme in function of an image, like iTunes 11 does. It is designed as a general purpose class set, in wich LEColorPicker is the interface for your client code.

LEColorPicker_Vortex LEColorPicker_Mona

Release note: Current release (1.0) run faster in devices than simulator.

Installation

Usage

First, you have to create an instance of a LEColorPicker object. Then, LEColorPicker class provides an instance method that receives an UIImage as input and returns a LEColorScheme object. LEColorScheme will provide the three computed colors as properties.

#import "LEColorPicker.h"
...
LEColorPicker *colorPicker = [[LEColorPicker alloc] init];
LEColorScheme *colorScheme = [colorPicker colorSchemeFromImage:image];
aView.backgroundColor = [colorScheme backgroundColor];
titleTextField.textColor = [colorScheme primaryTextColor];
bodyTextField.textColor = [colorScheme secondaryTextColor];
...

About the sample images

All images are public domain. If you want to add your own testing images, drag the image to the Resources folder of the project, in Xcode. Don't use names with "Default" or will be filtered. Only PNG images are supported (for now) in the sample project.

License

See LICENSE.markdown

Thanks to

Andrey Tarantsov for ATPagingView.

User Olie from StackOverflow, for his function to get a RGBA pixel array from an UIImage.

User Seth Thompson from StackOverflow for his Mathematica code for pick the colors like iTunes 11.

Ray Wenderlich tutorials.

Contact

Suggestions will be well received.

Mail luis.espinoza.severino@gmail.com

Twitter @luis_espinoza

MacBuildServer

You can try the demo in your device via MacBuildServer.

<!-- MacBuildServer Install Button --> <div class="macbuildserver-block"> <a class="macbuildserver-button" href="http://macbuildserver.com/project/github/build/?xcode_project=LEColorPickerDemo.xcodeproj&amp;target=LEColorPickerDemo&amp;repo_url=git%3A%2F%2Fgithub.com%2Fluisespinoza%2FLEColorPicker.git&amp;build_conf=Release" target="_blank"><img src="http://com.macbuildserver.github.s3-website-us-east-1.amazonaws.com/button_up.png"/></a><br/><sup><a href="http://macbuildserver.com/github/opensource/" target="_blank">by MacBuildServer</a></sup> </div> <!-- MacBuildServer Install Button -->

Bitdeli Badge