Latest 0.1.5
Homepage https://github.com/crazytonyli/Colory
License MIT
Platforms ios 8.0
Authors

Swift 3, 4
Build Status
CocoaPods Compatible
Carthage
License

A UIControl for picking color from HSB color palette.

Screenshot

P.S. Gradient looks way smoother on device than this gif.

Installation

CocoaPods

To install Colory using CocoaPods, add following line to your Podfile:

pod 'Colory'

Carthage

To install Colory using Carthage, add following line to your Cartfile:

github "crazytonyli/Colory"

Usage

Colory has very simple API.

Register action with valueChanged event to receive picked color changes.

let pickerView = ColorPickerView()
pickerView.addTarget(self, action: #selector(colorChanged(_:)), for: .valueChanged)

Use color property to get and set currently picked color.

@objc func colorChanged(_ pickerView: ColorPickerView) {
    update(with: pickerView.color)
}

Use layoutMargins to customize palette margins.

pickerView.layoutMargins = UIEdgeInsets(top: pickerView.layoutMargins.top,
                                        left: 20,
                                        bottom: pickerView.layoutMargins.bottom,
                                        right: 20)

LICENSE

This library is released under MIT License.

Latest podspec

{
    "name": "Colory",
    "version": "0.1.5",
    "summary": "A `UIControl` for picking color from HSB color palette.",
    "description": "Straight forward UI and simple API, use target-action to receive color updates.",
    "homepage": "https://github.com/crazytonyli/Colory",
    "license": "MIT",
    "authors": {
        "Tony Li": "[email protected]"
    },
    "social_media_url": "https://twitter.com/crazytonyli",
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.2",
    "source": {
        "git": "https://github.com/crazytonyli/Colory.git",
        "tag": "0.1.5"
    },
    "source_files": "Sources/*.{h,swift}",
    "public_header_files": "Sources/Colory.h"
}

Pin It on Pinterest

Share This