Swiftpack.co - hbang/Alderis as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by hbang.
hbang/Alderis 1.2.0
A fresh new color picker, with a gentle, fun, and dead simple user interface.
⭐️ 191
🕓 7 hours ago
.package(url: "https://github.com/hbang/Alderis.git", from: "1.2.0")

Alderis Color Picker

Try it yourself: pod try Alderis

Alderis is a fresh new color picker, with a gentle, fun, and dead simple user interface. It aims to incorporate the usual elements of a color picker, in a way that users will find easy and fun to use.

The user can start by selecting a color they like on the initial color palette tab, and either accept it, or refine it using the color wheel and adjustment sliders found on the two other tabs.

Alderis is named for the Alderamin (Alpha) star in the Cepheus (Cephei) constellation. (There is no dependency on the Cephei project.)


Click for full-quality MP4

Why do I want this? Isn’t there already a color picker in iOS?

Alderis was originally released before iOS 14 was unveiled with a built-in color picker feature, which seems to be heavily inspired by Alderis. However, rather than throw in the towel here, I’m considering this an opportunity to continue building what I feel is a better, less cluttered user experience, with more configuration options for apps to fine-tune a color picker UI suitable for each use case and target market.

If this doesn’t seem important to you, the answer is simple: skip Alderis and use UIColorPickerViewController. If it does, read on.

Feature Comparison

Alderis UIKit
Minimal UI ✔️ ✖️
Drag and drop colors within app ✔️ ✔️ *
Drag and drop colors across apps ✔️ ✖️
Color grid ✔️ ✔️
Color spectrum/wheel ✔️ ✔️
RGB sliders ✔️ ✔️
HSB sliders ✔️ ✖️
Grayscale slider ✔️ ✖️
Opacity slider ✔️ ✔️
Hex color code support ✔️ ✔️
Color space support (Display P3) ✖️ ✔️
Save favorite colors ✖️ ✔️
Saved colors shared across apps ✖️ ✔️
Grab color from screen (eyedropper) ✖️ ✔️
Customise title label ✔️ ✖️
Customise tab row visibility ✔️ ✖️
Customise visible tabs ✔️ ✖️
Customise initially selected tab ✔️ ✖️
Customise opacity slider visibility ✔️ ✔️
Customise color grid ✖️ ✖️
Interface Builder support ✖️ ✖️
SwiftUI support w/o UIKit bridging ✖️ ✖️
Observe value change with KVO ✖️ ✔️

* UIColorWell supports dragging colors onto it, but not out of it. Alderis supports both directions, which are separately configurable. The default Alderis ColorWell behavior matches UIColorWell. Alderis supports drag and drop on the color picker window; UIKit does not.



Add to your Podfile:

pod 'Alderis', '~> 1.2.0'

And then run pod install.


Add to your Cartfile:

github 'hbang/Alderis' ~> 1.2.0

And then run carthage update.

Swift Package Manager

  1. Click File → Swift Packages → Add Package Dependency.
  2. Enter http://github.com/hbang/Alderis.git.
  3. Specify 1.2 as the version filter.

Or, manually add it to your Package.swift:

dependencies: [
	.package(url: "http://github.com/hbang/Alderis.git", from: "1.2.0")

And then run swift package update.

Jailbreak packages

Add ws.hbang.alderis (>= 1.2) to your Depends: list.

Preference Bundles and libcolorpicker Compatibility

Alderis acts as a drop-in replacement for libcolorpicker, an abandoned but still very popular color picker library on jailbroken iOS. Packages can simply change their dependencies list to replace org.thebigboss.libcolorpicker with ws.hbang.alderis (>= 1.2) to switch their color picker to Alderis. No other changes required!

For more information, refer to the docs.


Licensed under the Apache License, version 2.0. Refer to LICENSE.md.

Header backdrop photo credit: John-Mark Smith on Unsplash


Stars: 191
Last commit: 15 hours ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

16 hours ago
  • Adds a Contrast Checker tab, where you can try your selected color in various configurations, and test its contrast against an algorithm.
    Alderis’s Contrast Checker tab displaying pink text with 4.81 (23%) contrast on a white background.
  • Adds a context menu on color wells, allowing copying a color in a variety of formats. (Requires iOS 14.)
    Alderis’s color context menu, allowing copying a color in hex, RGB, HSL, Objective-C, and Swift formats, or pasting a color.
  • Adds HSL (Hue, Saturation, and Lightness) to the color sliders tab. As compared to the existing HSB (Hue, Saturation, and Brightness) sliders, HSL uses a slightly different formula that is considered more realistic to how we perceive color. HSL is also used by CSS. Alderis’s HSL sliders being displayed with a lime green color.
  • Adds a gradient background to color sliders, so you can see how your color will change if you tweak each slider.
  • UI has been tweaked all around to look great in Catalyst apps configured for Mac UI mode. An Alderis color picker being presented as a popup from a button labelled “Present” in a Mac app.
  • Hopefully fixes an issue with the jailbreak package sometimes not working on iOS 12.
  • Reduces jailbreak package size by 70%.

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