Git Product home page Git Product logo

lecolorpicker's Introduction

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

  • Add the OpenGLES framework to your project.
  • Drag the 'LEColorPickerDemo/LEColorPicker' folder into your project, and you are done.

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 [email protected]

Twitter @luis_espinoza

MacBuildServer

You can try the demo in your device via MacBuildServer.

Bitdeli Badge

lecolorpicker's People

Contributors

luisespinoza avatar bitdeli-chef avatar octplane avatar macbuildserver avatar

Watchers

Shineit avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.