All Projects → gizmosachin → Colorslider

gizmosachin / Colorslider

Licence: mit
🎨 Snapchat-style color picker in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Colorslider

cidrawing
A vector graphics library for Android
Stars: ✭ 35 (-86.43%)
Mutual labels:  drawing
VisualDebugger
The most elegant and easiest way to visual you data in playground
Stars: ✭ 22 (-91.47%)
Mutual labels:  drawing
color-generate
An awesome theme color generation scheme.
Stars: ✭ 165 (-36.05%)
Mutual labels:  color-picker
flutter material color picker
Material color picker, you can customize colors. Selection in two step, first main color and after shades.
Stars: ✭ 68 (-73.64%)
Mutual labels:  color-picker
kImageAnnotator
Tool for annotating images
Stars: ✭ 55 (-78.68%)
Mutual labels:  drawing
FuncMorph
Crazy figures and animations with Haskell
Stars: ✭ 30 (-88.37%)
Mutual labels:  drawing
SyncPaint
A web app for synchronized group drawing. Draw together with other people in real time.
Stars: ✭ 42 (-83.72%)
Mutual labels:  drawing
Colorpicker
🎨 A color picker for Android. Pick a color using color wheel and slider (HSV & alpha).
Stars: ✭ 254 (-1.55%)
Mutual labels:  color-picker
OLC-Repo
A repository for scripts, prefabs, and whatever else
Stars: ✭ 31 (-87.98%)
Mutual labels:  snapchat
pencil-scribbles
Create pencil effect drawings from pictures using R
Stars: ✭ 30 (-88.37%)
Mutual labels:  drawing
adobe-color-picker
The rebuilt color picker of Adobe scripting for PS,AI,AE and so on.
Stars: ✭ 37 (-85.66%)
Mutual labels:  color-picker
fishdraw
procedurally generated fish drawings
Stars: ✭ 1,963 (+660.85%)
Mutual labels:  drawing
canvas-color-tracker
A utility to track objects on a canvas by unique px color
Stars: ✭ 29 (-88.76%)
Mutual labels:  drawing
pydrawing
Pydrawing: Beautify your image or video.
Stars: ✭ 81 (-68.6%)
Mutual labels:  drawing
Egorozh.ColorPicker
🎨🎨🎨 Best of the best ColorPicker on WPF and AvaloniaUI
Stars: ✭ 39 (-84.88%)
Mutual labels:  color-picker
react-native-draw
SVG based data-driven React Native drawing component 🎨
Stars: ✭ 41 (-84.11%)
Mutual labels:  drawing
desert
A fast (?) random sampling drawing library
Stars: ✭ 61 (-76.36%)
Mutual labels:  drawing
Tinyengine
Tiny OpenGL Wrapper / 3D Engine in C++
Stars: ✭ 251 (-2.71%)
Mutual labels:  drawing
rnote
A simple drawing application to create handwritten notes.
Stars: ✭ 1,538 (+496.12%)
Mutual labels:  drawing
AsyPad
A simple drawing tool that can convert diagrams into Asymptote code.
Stars: ✭ 18 (-93.02%)
Mutual labels:  drawing


ColorSlider is an iOS color picker with live preview written in Swift.

Build Status Pod Version Swift Version GitHub license

Features
👻 "Snapchat-style" color picker
🌈 Extensible live preview
🎨 Customizable appearance
🌀 Vertical and horizontal support
🎹 Black and white colors included
📚 Fully documented
🐤 Swift 5

Usage

Create and add a ColorSlider to your view:

let colorSlider = ColorSlider(orientation: .vertical, previewSide: .left)
colorSlider.frame = CGRect(x: 0, y: 0, width: 12, height: 150)
view.addSubview(colorSlider)

Respond to changes in color using UIControlEvents:

colorSlider.addTarget(self, action: #selector(changedColor(_:)), forControlEvents: .valueChanged)

func changedColor(_ slider: ColorSlider) {
    var color = slider.color
    // ...
}

Customize appearance attributes:

// Add a border
colorSlider.gradientView.layer.borderWidth = 2.0
colorSlider.gradientView.layer.borderColor = UIColor.white.cgColor

// Disable rounded corners
colorSlider.gradientView.automaticallyAdjustsCornerRadius = false

Preview

ColorSlider has a live preview that tracks touches along it. You can customize it:

let previewView = ColorSlider.DefaultPreviewView()
previewView.side = .right
previewView.animationDuration = 0.2
previewView.offsetAmount = 50

let colorSlider = ColorSlider(orientation: .vertical, previewView: previewView)

Create your own live preview by subclassing DefaultPreviewView or implementing ColorSliderPreviewing in your UIView subclass. Then, just pass your preview instance to the initializer:

let customPreviewView = MyCustomPreviewView()
let colorSlider = ColorSlider(orientation: .vertical, previewView: customPreviewView)

ColorSlider will automatically update your view's center as touches move on the slider. By default, it'll also resize your preview automatically. Set colorSlider.autoresizesSubviews to false to disable autoresizing.

To disable the preview, simply pass nil to ColorSlider's initializer:

let colorSlider = ColorSlider(orientation: .vertical, previewView: nil)

See the documentation for more details on custom previews.

Documentation

ColorSlider is fully documented here.

Installation

CocoaPods

platform :ios, '9.0'
pod 'ColorSlider', '~> 4.4'

Carthage

github "gizmosachin/ColorSlider" >= 4.4

Version Compatibility

Swift Version ColorSlider Version
5.0 master
4.2 4.3

Demo

Please see the Demo directory for a basic iOS project that uses ColorSlider.

Contributing

ColorSlider is a community - contributions and discussions are welcome!

Please read the contributing guidelines prior to submitting a Pull Request.

License

ColorSlider is available under the MIT license, see the LICENSE file for more information.

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