All Projects → dmrschmidt → SwiftColorWheel

dmrschmidt / SwiftColorWheel

Licence: Apache-2.0 license
Delightful color picker wheel for iOS in Swift.

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to SwiftColorWheel

Leonardo
Generate colors based on a desired contrast ratio
Stars: ✭ 973 (+2529.73%)
Mutual labels:  color, colorscheme, color-picker, colors, color-palette
Colorschemes.jl
colorschemes, colormaps, gradients, and palettes
Stars: ✭ 55 (+48.65%)
Mutual labels:  color, colors, color-scheme, color-palette
Colors App
🎨 A PWA for copying values from popular color palettes. Supports HEX, RGB, and HSL formats.
Stars: ✭ 90 (+143.24%)
Mutual labels:  color, color-picker, color-scheme, color-palette
Colors.lol
🎨 Overly descriptive color palettes
Stars: ✭ 207 (+459.46%)
Mutual labels:  color, colors, color-scheme, color-palette
Colorbook
🎨 Color schemes for UI design - Optimized for foreground, background, border, etc. https://liyasthomas.github.io/colorbook
Stars: ✭ 148 (+300%)
Mutual labels:  color, color-picker, color-scheme, color-palette
pantone-colors
Hex values of all 2310 Pantone colors
Stars: ✭ 147 (+297.3%)
Mutual labels:  color, color-picker, colors, color-palette
Nord
An arctic, north-bluish color palette.
Stars: ✭ 4,816 (+12916.22%)
Mutual labels:  colorscheme, colors, color-scheme, color-palette
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (+632.43%)
Mutual labels:  color, color-picker, colors, color-palette
Materialdesigncolor
This project shows the color in material design
Stars: ✭ 55 (+48.65%)
Mutual labels:  color, colors, color-palette
Nord Konsole
An arctic, north-bluish clean and elegant Konsole color scheme.
Stars: ✭ 56 (+51.35%)
Mutual labels:  color, colorscheme, color-scheme
react-native-color-panel
React Native Color Panel Component for iOS and Android 🏳️‍🌈
Stars: ✭ 21 (-43.24%)
Mutual labels:  color, color-picker, color-palette
Nord Hyper
An arctic, north-bluish clean and elegant Hyper theme plugin.
Stars: ✭ 96 (+159.46%)
Mutual labels:  color, colors, color-scheme
Iceberg.vim
🇦🇶 Bluish color scheme for Vim and Neovim
Stars: ✭ 1,636 (+4321.62%)
Mutual labels:  color, colorscheme, color-scheme
Colors.jl
Color manipulation utilities for Julia
Stars: ✭ 114 (+208.11%)
Mutual labels:  color, colors, color-scheme
Gvcci
color extraction to turn images into 16 color palettes
Stars: ✭ 86 (+132.43%)
Mutual labels:  color, color-scheme, color-palette
Nord Guake
An arctic, north-bluish clean and elegant Guake color theme.
Stars: ✭ 20 (-45.95%)
Mutual labels:  color, colorscheme, color-scheme
Kallewheel
A custom color wheel extension for Adobe Photoshop
Stars: ✭ 16 (-56.76%)
Mutual labels:  color, color-picker, color-palette
Androidphotoshopcolorpicker
A fully featured Color picker Library for Android
Stars: ✭ 220 (+494.59%)
Mutual labels:  color, color-picker, colors
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 (-32.43%)
Mutual labels:  color, color-picker, color-palette
Chromacolorpicker
🎨 An intuitive iOS color picker built in Swift.
Stars: ✭ 434 (+1072.97%)
Mutual labels:  color, color-picker, color-palette

SwiftColorWheel

Carthage compatible Swift Package Manager compatible

A beautiful, customizable color wheel for iOS in Swift.

ScreenshotRotating ScreenshotScreenshot

More related iOS Controls

You may also find the following iOS controls written in Swift interesting:

Also check it out on CocoaControls.

If you really like this library (aka Sponsoring)

I'm doing all this for fun and joy and because I strongly believe in the power of open source. On the off-chance though, that using my library has brought joy to you and you just feel like saying "thank you", I would smile like a 4-year old getting a huge ice cream cone, if you'd support my via one of the sponsoring buttons ☺️💕

If you're feeling in the mood of sending someone else a lovely gesture of appreciation, maybe check out my iOS app 💌 SoundCard to send them a real postcard with a personal audio message.

Buy Me A Coffee

Installation

Swift Package Manager

Just add https://github.com/dmrschmidt/SwiftColorWheel and select "Up to Next Major"

Carthage

Simply add the following to your Cartfile and run carthage update:

github "dmrschmidt/SwiftColorWheel", ~> 1.5

Usage

Either, add a ColorWheel or RotatingColorWheel as a custom UIView subclass to your interface builder. Alternatively, you can of course simply add it programmatically as a subview to any normal UIView.

This will already render your color picker. However it doesn't react on your taps yet. For that, set yourself as it's delegate. See the very simplified code example below:

class MyViewController: UIViewController, ColorWheelDelegate {
    private var colorWheel: ColorWheel!

    override func viewDidLoad() {
        super.viewDidLoad()

        colorWheel = ColorWheel(frame: view.frame)
        colorWheel.delegate = self
        view.addSubview(colorWheel)
    }

    // MARK: - ColorWheelDelegate

    func didSelect(color: UIColor) {
        view.backgroundColor = color
    }
}

Customization

You can modify the look of the color wheel through various exposed properties.

// Extra padding in points to the view border.
colorWheel.padding = 13.0

// Radius in point of the central color circle (for black & white shades).
colorWheel.centerRadius = 5.0

// Smallest circle radius in point.
colorWheel.minCircleRadius = 1.0

// Largest circle radius in point.
colorWheel.maxCircleRadius = 5.0

// Padding between circles in point.
colorWheel.innerPadding = 3

/**
 Degree by which each row of circles is shifted.
 A value of 0 results in a straight layout of the inner circles.
 A value other than 0 results in a slightly shifted, fractal-ish / flower-ish look.
*/
colorWheel.shiftDegree = 0

// Overall density of inner circles.
colorWheel.density = 1.0

// Stroke color highlighting currently selected color. Set nil to disable highlighting.
// Default is UIColor.white.
colorWheel.highlightStrokeColor = nil

In some case (like when a RotatingColorWheel is placed inside a UIScrollView) you may want to tweak the default gesture handling for the rotation. If you do so, you can get access to the original gesture handler and use it in composition.

let originalHandler = rotatingWheel.panRecognizer.delegate
yourRetainedHandler = YourTweakedHandler(complementing: originalHandler)
rotatingWheel.panRecognizer.delegate = yourRetainedHandler
rotatingWheel.rotateRecognizer.delegate = yourRetainedHandler

YourTweakedHandler could then implement gestureRecognizerShouldBegin(_:) in conjunction with the originally provided handler.

See it live in action

SoundCard - postcards with sound lets you send real, physical postcards with audio messages. Right from your iOS device.

SwiftColorWheel is used to color the waveform derived from the audio message on postcards sent by SoundCard - postcards with audio.

 

Download SoundCard

Download SoundCard on the App Store.

 

Screenshot
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].