All Projects → jacquesCedric → Jcggcolorslider

jacquesCedric / Jcggcolorslider

Licence: mit
Colorful NSSlider subclass

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Jcggcolorslider

Realm Tasks
To Do app built with Realm, inspired by Clear for iOS
Stars: ✭ 369 (+1842.11%)
Mutual labels:  cocoa
Midiapps
MIDI apps for Mac OS X: MIDI Monitor and SysEx Librarian.
Stars: ✭ 488 (+2468.42%)
Mutual labels:  cocoa
Xit
Mac OS X Git GUI
Stars: ✭ 700 (+3584.21%)
Mutual labels:  cocoa
Iostips
记录iOS(Swift)开发中的一些知识点、小技巧
Stars: ✭ 376 (+1878.95%)
Mutual labels:  cocoa
Fluentui Apple
UIKit and AppKit controls for building native Microsoft experiences
Stars: ✭ 459 (+2315.79%)
Mutual labels:  cocoa
Vimr
Project VimR is a Neovim GUI for macOS. The goal is to build an editor that uses Neovim inside with many of the convenience GUI features similar to those present in modern editors. We mainly use Swift, but also use C/Objective-C when where appropriate.
Stars: ✭ 5,524 (+28973.68%)
Mutual labels:  cocoa
Coteditor
Lightweight Plain-Text Editor for macOS
Stars: ✭ 4,129 (+21631.58%)
Mutual labels:  cocoa
Wfcolorcode
NSColor extension adding ability to handle HSL color space and CSS3 style color codes
Stars: ✭ 16 (-15.79%)
Mutual labels:  cocoa
Swiftai
SwiftAI, write Swift code smart. SwiftAI can generate Model class from JSON now. Codable and HandyJSON is supported. More features will be add.
Stars: ✭ 470 (+2373.68%)
Mutual labels:  cocoa
Latest
A small utility app for macOS that makes sure you know about all the latest updates to the apps you use.
Stars: ✭ 657 (+3357.89%)
Mutual labels:  cocoa
Segmentedprogressbar
Snapchat / Instagram Stories like progress indicator
Stars: ✭ 376 (+1878.95%)
Mutual labels:  cocoa
Seaglass
A truly native Matrix client for macOS - written in Swift/Cocoa, with E2E encryption support
Stars: ✭ 428 (+2152.63%)
Mutual labels:  cocoa
Strongbox
A KeePass/Password Safe Client for iOS and OS X
Stars: ✭ 586 (+2984.21%)
Mutual labels:  cocoa
Sentry Cocoa
The official Sentry SDK for iOS, tvOS, macOS, watchOS
Stars: ✭ 370 (+1847.37%)
Mutual labels:  cocoa
Scrooge
A Thrift parser/generator
Stars: ✭ 724 (+3710.53%)
Mutual labels:  cocoa
Wxwidgets
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.
Stars: ✭ 3,994 (+20921.05%)
Mutual labels:  cocoa
Brisk
✨Cross-platform set of tools for building native UIs with Reason/OCaml
Stars: ✭ 518 (+2626.32%)
Mutual labels:  cocoa
Cocoaheads Ukraine
Collection of talks given at the CocoaHeads Ukraine meetups.
Stars: ✭ 18 (-5.26%)
Mutual labels:  cocoa
Nswindowstyles
A showcase of the many different styles of windows possible with NSWindow on macOS
Stars: ✭ 801 (+4115.79%)
Mutual labels:  cocoa
Orsserialport
Serial port library for Objective-C and Swift macOS apps
Stars: ✭ 609 (+3105.26%)
Mutual labels:  cocoa

JCGGColorSlider Swift 4.2 MIT license

A colorful subclass of NSSlider.

An NSSlider subclass. Supports colored sliders, including gradients. Can match knob color to that of location on the slider.

Installation

Clone the source and copy JCGGColorSlider.swift to your project.

Use

Simply assign an NSSlider to subclass JCGGColorSlider. Slider can be configured with the following options:

  • barColor - The color of the NSSlider bar
  • barGradient - Overrides barColor, assign a gradient to the slider
  • knobColor - Color of the knob
  • knobColorFromLocation - overrides knobColor, setting the knob's color to that of it's location on the slider bar
  • bezelMargin - effects the thickness of the slider bar

Example - Rainbow gradient

  1. Create an NSSlider and assign its subclass to JCGGColorSlider
  2. Create a rainbow gradient
  3. Assign gradient to NSSlider
  4. Set knob to match color
// 1
let exampleSlider = JCGGSlider.init(frame: example)

// 2
let rainbow = NSGradient.init(colors: Array(0...10).map{ NSColor.init(calibratedHue: CGFloat($0) / 10, saturation: 1.0, brightness: 1.0, alpha: 1.0) })!

// 3
exampleSlider.barGradient = rainbow

// 4
exampleSlider.knobColorFromLocation = true

License

JCGGColorSlider is available under the MIT license. See the LICENSE file for more details.

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