WrkstrmColor 颜色库

wrkstrm-color

MIT License

wrkstrm 端口,是 HSLuvSwift (版本 4) 的移植版本,由 Clay Smith 提供

说明、演示、移植等。

用法

此框架在操作系统特定的颜色类上添加一个初始化器,以从 HSLuv 参数创建颜色。该初始化器在 macOS 和 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)

待办事项

许可证

请参阅 许可证