Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/InfinitApps/InfColorPicker
iOS color picker view controller which presents a hue bar and a saturation/brightness box to allow selection of any RGB color.
https://github.com/InfinitApps/InfColorPicker
Last synced: about 1 month ago
JSON representation
iOS color picker view controller which presents a hue bar and a saturation/brightness box to allow selection of any RGB color.
- Host: GitHub
- URL: https://github.com/InfinitApps/InfColorPicker
- Owner: InfinitApps
- License: mit
- Created: 2011-09-05T21:59:39.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-12-11T17:42:45.000Z (about 11 years ago)
- Last Synced: 2024-03-14T19:02:53.340Z (9 months ago)
- Language: M
- Homepage:
- Size: 249 KB
- Stars: 205
- Watchers: 15
- Forks: 56
- Open Issues: 4
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE.txt
Awesome Lists containing this project
- awesome - InfColorPicker - iOS color picker view controller which presents a hue bar and a saturation/brightness box to allow selection of any RGB color. (etc)
- awesome - InfColorPicker - iOS color picker view controller which presents a hue bar and a saturation/brightness box to allow selection of any RGB color. (etc)
README
The InfinitApps 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](http://f.cl.ly/items/0b0X0Z1t2A170E0c3L1R/InfColorPicker.png)
InfColorPicker is distributed with an MIT license.
It is ARC-based and supports iPhone OS 5 and later (with one small change it could be made compatible back to iOS 4 if that's necessary).
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 ];
}