Skip to content

A color picker control for iOS with support for wide colors written in Swift.

License

Notifications You must be signed in to change notification settings

saoudrizwan/IMGLYColorPicker

 
 

Repository files navigation

IMGLYColorPicker

CI Status Version License Platform

IMGLYColorPicker is a color picker control for iOS that has been extracted from the PhotoEditor SDK and made available as open source. It is written in Swift, compatible with Objective-C and has full support for wide colors. A user can select a color by hue, saturation, brightness and alpha.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

IMGLYColorPicker is written in Swift 3, so it requires Xcode 8. It is completely compatible with Objective-C and supports iOS 9 and above.

Installation

IMGLYColorPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "IMGLYColorPicker"

Usage

Instantiate a ColorPickerView instance (or IMGLYColorPickerView if using Objective-C) and add it to your view hierachy:

let colorPickerView = ColorPickerView()
view.addSubview(colorPickerView)

Set the initially displayed color of the color picker:

colorPickerView.color = UIColor.red

Register yourself as a target to receive .valueChanged events whenever the selected color changes:

colorPickerView.addTarget(self, action: #selector(colorPicked(_:)), for: .valueChanged)

Author

9elements GmbH, contact@9elements.com

License

IMGLYColorPicker is available under the MIT license. See the LICENSE file for more info.

About

A color picker control for iOS with support for wide colors written in Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 78.1%
  • Shell 17.7%
  • Ruby 2.8%
  • Objective-C 1.4%