Skip to content

hsluv/hsluv-apple

Repository files navigation

HSLuvSwift

SwiftPM compatible Carthage compatible Build Status MIT License

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

Explanation, demo, ports etc.

USAGE

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

// macOS
let color = NSColor(hue: 360.0, saturation: 100.0, lightness: 100.0, alpha: 1.0)

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

INSTALL

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

Swift Package Manager

As of version 2.1.0, you can use the Swift Package Manager as integration method. If you want to use the Swift Package Manager as integration method, either use Xcode to add the package dependency or add the following dependency to your Package.swift:

.package(url: "https://github.com/hsluv/hsluv-apple.git", from: "2.1.0"),

Carthage

Add github "hsluv/hsluv-apple" ~> 2.0.0 to your Cartfile and run carthage bootstrap. This builds frameworks for Mac and iOS targets.

> echo 'github "hsluv/hsluv-apple" ~> 2.0.0' >> Cartfile
> carthage bootstrap

TODO

  • Finish HPLuv implementation
  • Improve tests and add continuous integration testing
  • Add usage documentation

License

See License

About

AppKit / UIKit implementation of HSLuv (revision 4)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages