Skip to content

wrkstrm/WrkstrmColor

Repository files navigation

WrkstrmColor

wrkstrm-color

MIT License

The wrkstrm port of HSLuvSwift (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 = .init(hue: 360.0, saturation: 100.0, lightness: 100.0, alpha: 1.0)

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

TODO

  • Finish HPLuv implementation
  • Add usage documentation

License

See License