Latest 1.2.0
License MIT @see LICENSE
Platforms ios 8.0, osx 10.11, requires ARC
Frameworks Foundation
Authors ,

Cocoapod compatible
Carthage compatible
MIT License

Swift port of HUSL (revision 4), courtesy
of Clay Smith

Explanation, demo, ports etc.


This framework adds a single initializer on the OS-specific color class to create a color from HUSL parameters. The initializer takes the same parameters on both OSX and iOS.

// OSX
let color = NSColor(hue: 360.0, saturation: 100.0, lightness: l00.0, alpha: 1.0)

// iOS
let color = UIColor(hue: 360.0, saturation: 100.0, lightness: l00.0, alpha: 1.0)


This project is compatible with CocoaPods and Carthage. (These instructions assume that your chosen method is already installed.)


Add pod 'HUSLSwift' to your target. Since this is a Swift dynamic framework, you must also tell CocoaPods to use_frameworks! instead of static libraries.

platform :ios, '8.0' # or, :osx, '10.10'

target 'YourProject' do
pod 'HUSLSwift', '~> 1.1.0'


Add github "husl-colors/husl-swift" ~> 1.1.0 to your Cartfile and run carthage bootstrap. This builds frameworks for Mac and iOS targets.

> echo 'github "husl-colors/husl-swift" ~> 1.1.0' >> Cartfile
> carthage bootstrap


  • Finish HUSLP implementation
  • Improve tests and add continuous integration testing
  • Add Carthage instructions
  • Add usage documentation


See License

Latest podspec

    "name": "HUSLSwift",
    "version": "1.2.0",
    "summary": "Swift port of HUSL, a human-friendly alternative to HSL",
    "homepage": "",
    "license": {
        "type": "MIT",
        "text": "@see LICENSE"
    "authors": {
        "Clay Smith": "[email protected]",
        "Alexei Boronine": "[email protected]"
    "source": {
        "git": "",
        "tag": "v1.2.0"
    "requires_arc": true,
    "xcconfig": {
    "source_files": "Source/*.{swift}",
    "frameworks": "Foundation",
    "platforms": {
        "ios": "8.0",
        "osx": "10.11"
    "ios": {
        "source_files": "Extensions/UIKit/*.{swift}",
        "frameworks": "UIKit"
    "osx": {
        "source_files": "Extensions/AppKit/*.{swift}",
        "frameworks": "AppKit"

Pin It on Pinterest

Share This