Giter Site home page Giter Site logo

mehulgecg / infcolorpicker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from infinitapps/infcolorpicker

1.0 2.0 0.0 96 KB

iOS color picker view controller which presents a hue bar and a saturation/brightness box to allow selection of any RGB color.

License: MIT License

infcolorpicker's Introduction

The InfiniApps Color Picker, known as InfColorPicker, is a view controller for use in iOS applications to allow the selection of a color from RGB space, but using an HSB representation of that color space to make selection of a color easier for a human.

InfColorPicker Screenshot

InfColorPicker is distributed with an MIT license. It supports iPhone OS 3.x as well as iOS 4 and 5.

Usage

The main component is the InfColorPickerController class, which can be instantiated and hosted in a few different ways, such as in a popover view controller for the iPad, pushed onto a navigation controller navigation stack, or presented modally on an iPhone.

The initial color can be set via the property sourceColor, which will be shown alongside the user-selected resultColor color, and these can be accessed and changed while the color picker is visible.

In order to receive the selected color(s) back from the controller, you have to have an object that implements one of the methods in the InfColorPickerControllerDelegate protocol.

Example

- (void) changeColor
{
	InfColorPickerController* picker = [ InfColorPickerController colorPickerViewController ];
	
	picker.sourceColor = self.color;
	picker.delegate = self;
	
	[ picker presentModallyOverViewController: self ];
}

- (void) colorPickerControllerDidFinish: (InfColorPickerController*) picker
{
	self.color = picker.resultColor;
	
	[ self dismissModalViewControllerAnimated: YES ];
}

infcolorpicker's People

Contributors

tgaul avatar

Stargazers

Mehul Mistri avatar

Watchers

Mehul Mistri avatar  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.