All Projects → joncardasis → Chromacolorpicker

joncardasis / Chromacolorpicker

Licence: mit
🎨 An intuitive iOS color picker built in Swift.

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Chromacolorpicker

Leonardo
Generate colors based on a desired contrast ratio
Stars: ✭ 973 (+124.19%)
Mutual labels:  color, color-picker, color-theme, color-palette
Xcode One Dark
Atom One Dark theme for Xcode
Stars: ✭ 273 (-37.1%)
Mutual labels:  cocoapods, carthage, color, color-theme
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (-37.56%)
Mutual labels:  color, color-picker, color-theme, color-palette
Gradientcircularprogress
Customizable progress indicator library in Swift
Stars: ✭ 407 (-6.22%)
Mutual labels:  cocoapods, carthage, customizable
Tkrubberindicator
A rubber animation pagecontrol
Stars: ✭ 1,337 (+208.06%)
Mutual labels:  cocoapods, carthage, ios-animation
Tkdotsegment
TKDotSegment is a segment with dot animation
Stars: ✭ 103 (-76.27%)
Mutual labels:  cocoapods, carthage, ios-animation
Koyomi
Simple customizable calendar component in Swift 📆
Stars: ✭ 716 (+64.98%)
Mutual labels:  cocoapods, carthage, customizable
Colorizeswift
Terminal string styling for Swift.
Stars: ✭ 253 (-41.71%)
Mutual labels:  cocoapods, carthage, color
Nvactivityindicatorview
A collection of awesome loading animations
Stars: ✭ 10,031 (+2211.29%)
Mutual labels:  cocoapods, carthage, ios-animation
react-native-image-color-picker
Image color picker based on image source provided and return image different color palettes or average color palette
Stars: ✭ 25 (-94.24%)
Mutual labels:  color, color-picker, color-palette
pantone-colors
Hex values of all 2310 Pantone colors
Stars: ✭ 147 (-66.13%)
Mutual labels:  color, color-picker, color-palette
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+171.89%)
Mutual labels:  cocoapods, carthage, ios-animation
Tkswitchercollection
An animation switch collection
Stars: ✭ 877 (+102.07%)
Mutual labels:  cocoapods, carthage, ios-animation
Pickr
🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
Stars: ✭ 3,759 (+766.13%)
Mutual labels:  color, color-picker, color-palette
Nightnight
Elegant way to integrate night mode to swift projects
Stars: ✭ 771 (+77.65%)
Mutual labels:  cocoapods, carthage, color
Swiftpagemenu
Customizable Page Tab Menu Controller 👍
Stars: ✭ 233 (-46.31%)
Mutual labels:  cocoapods, carthage, customizable
SwiftColorWheel
Delightful color picker wheel for iOS in Swift.
Stars: ✭ 37 (-91.47%)
Mutual labels:  color, color-picker, color-palette
javascript-color-gradient
Lightweight JavaScript library, used to generate an array of color gradients, between start and finish colors.
Stars: ✭ 54 (-87.56%)
Mutual labels:  color, color-picker, color-palette
Colors App
🎨 A PWA for copying values from popular color palettes. Supports HEX, RGB, and HSL formats.
Stars: ✭ 90 (-79.26%)
Mutual labels:  color, color-picker, color-palette
Colorbook
🎨 Color schemes for UI design - Optimized for foreground, background, border, etc. https://liyasthomas.github.io/colorbook
Stars: ✭ 148 (-65.9%)
Mutual labels:  color, color-picker, color-palette

ChromaColorPicker 2.0

An intuitive HSB color picker built in Swift. Supports multiple selection handles and is customizable to your needs.

ChromaColorPicker GIF

Looking for version 1.x? Version 1.x.x can be found on the legacy branch. While the pod is still available, it is deprecated and projects should migrate to 2.0.

Examples

let colorPicker = ChromaColorPicker(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
addSubview(colorPicker)

// Optional: Attach a ChromaBrightnessSlider to a ChromaColorPicker
let brightnessSlider = ChromaBrightnessSlider(frame: CGRect(x: 0, y: 0, width: 280, height: 32))
addSubview(brightnessSlider)

colorPicker.connect(brightnessSlider) // or `brightnessSlider.connect(to: colorPicker)`
  • View the Example app for more.

Usage

Multiple Handles

// Add handle at color
let peachColor = UIColor(red: 1, green: 203 / 255, blue: 164 / 255, alpha: 1)
colorPicker.addHandle(at: peachColor)

// Add handle with reference
let customHandle = ChromaColorHandle()
customHandle.color = UIColor.purple
colorPicker.addHandle(customHandle)

// Add handle and keep reference
let handle = colorPicker.addHandle(at: .blue)

Custom Handle Icon

let homeHandle = ChomaColorHandle(color: .blue)
let imageView = UIImageView(image: #imageLiteral(resourceName: "home-icon").withRenderingMode(.alwaysTemplate))
imageView.contentMode = .scaleAspectFit
imageView.tintColor = .white
homeHandle.accessoryView = imageView
homeHandle.accessoryViewEdgeInsets = UIEdgeInsets(top: 2, left: 4, bottom: 4, right: 4)

colorPicker.addHandle(homeHandle)

Installation

Carthage

github "joncardasis/ChromaColorPicker"

Cocoapods

pod 'ChromaColorPicker'

Manually

Add all files from the Source folder to your project.

Components

Component Description
ChromaColorPicker An HSB color picker with support for adding multiple color selection handles.
ChromaBrightnessSlider A slider UIControl which can be attached to any ChromaColorPicker via the connect(to:) method. ChromaBrightnessSlider can also function as a stand-alone UIControl.

Supported UIControlEvents

Both ChromaBrightnessSlider and ChromaColorPicker conform to UIControl. Each send UIControlEvents which can be observed via via UIControl's addTarget method.

ChromaColorPicker | Event | Description | | :-----------------:|:-------------| | .valueChanged | Called whenever the color has changed. | | .touchUpInside | Called when a handle is released. |

ChromaBrightnessSlider | Event | Description | | :-----------------:|:-------------| | .touchDown | Called when a the slider is grabbed. | | .valueChanged | Called whenever the slider is moved and the value has changed. | | .touchUpInside | Called when the slider handle is released. |

// Example
brightnessSlider.addTarget(self, action: #selector(sliderDidValueChange(_:)), for: .valueChanged)

@objc func sliderDidValueChange(_ slider: ChromaBrightnessSlider) {
  print("new color: \(slider.currentColor)")
}

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].