Swiftpack.co -  will-lumley/macColorPicker as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
A tiny pure swift replacement for NSColorWell.
.package(url: "https://github.com/will-lumley/macColorPicker.git", from: "1.2.2")

ColorPicker: Elegant Color Picking


CI Status Version Carthage Compatible SPM Compatible Swift 5.0 Platform License Twitter

macColorPicker is a tiny, pure Swift library designed for macOS applications that allows you to let your users easily choose a color.

macColorPicker allows you to present the user with a preset range of colors to choose from. As the developer, you get to choose how these are formatted, how they look, and what happens when a user makes a selection. If you want to give the user more control, you can allow them to select a button that presents the NSColorPanel.


macColorPicker is simply a subclass of NSView so you can simply add ColorPicker like you would any other view, whether it be to your storyboard, XIB, or just in code. Configuring ColorPicker's delegate allows you to be notified when the ColorPicker view is about to be presented, when is has been presented, or when a user has selected a color.


Example Project

To run the example project, clone the repo, and run pod install from the Example directory first.


macColorPicker supports macOS 10.12 and above.



macColorPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'macColorPicker', '~> 1.2.2'


macColorPicker is also available through Carthage. To install it, simply add the following line to your Cartfile:

github "will-lumley/ColorPicker" == 1.2.2

Swift Package Manager

macColorPicker is also available through Swift Package Manager. To install it, simply add the dependency to your Package.Swift file:

dependencies: [
    .package(url: "https://github.com/will-lumley/macColorPicker.git", from: "1.2.2"),
targets: [
    .target( name: "YourTarget", dependencies: ["macColorPicker"]),


William Lumley, will@lumley.io


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


Stars: 0
Last commit: 5 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API